Rails::Initializer.run do |config| config.active_record.pluralize_table_names = false end hi if i write the above code in environment.rb then it makes my all table names singular instead of plural..or i can say i m removing pluralization for all models. but i m not finding any solution....how can i make pluralization false for only one model.... i tried class Book < ActiveRecord::Base.pluralize_table_names = false end but its not working...... i am waiting for answer......ASAP --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Feb-29 11:47 UTC
Re: how can i make pluralization false got a single model
On 29 Feb 2008, at 11:41, ripan wrote:> > Rails::Initializer.run do |config| > config.active_record.pluralize_table_names = false > end > hi if i write the above code in environment.rb then it makes my all > table names singular instead of plural..or i can say i m removing > pluralization for all models. > > but i m not finding any solution....how can i make pluralization false > for only one model.... >Use set_table_name ? Fred> i tried > > class Book < ActiveRecord::Base.pluralize_table_names = false > > end > > but its not working...... > i am waiting for answer......ASAP > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---