Is there a way to put a model into a module?

Hi all,

A friend and I want to generate a model based on a table named
‘modules’, I know that “Module” is a class in Ruby, and so, I would
like to know how to generate this model.

Thanks,

Best Regards,

Stephane

On 3/14/08, Stéphane Wirtel [email protected] wrote:

Hi all,

A friend and I want to generate a model based on a table named
‘modules’, I know that “Module” is a class in Ruby, and so, I would
like to know how to generate this model.

You’ll have to pick another name for the class, then override the
table name so somthing like

class ModuleModel < ActiveRecord::Base

set_table_name “modules”

end


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs