> If I understand things correctly, by default, Rails expects both the > ActiveRecord class name and the model name (i.e., the name of the file > that contains the definition of the ActiveRecord class) to be the > singluar of the table name. How can I override this default behavior > with respect to the model name? That is, I would like to have the > file name of the file that contains the definition of the ActiveRecord > class to be something totally different from the table name. Thanks > for any input.
app/models/apple.rb: class Apple < ActiveRecord::Base set_table_name 'oranges' end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---