lo there all. i am having a strange problem with generating a scaffold. everything is pluralized. for example, if i do a script/generate scaffold Admin ( the example in my book ) instead of admin_controller.rb i get admins_controller.rb instead of /app/views/admin i get /app/views/admins is there a configuration setting that i am missing ? thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
pluralization is by design. try this in your environment.rb do disable pluralization if you need. ActiveRecord::Base.pluralize_table_names = false HTH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 5, 1:30 am, "dweinand" <mail...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> pluralization is by design. > try this in your environment.rb do disable pluralization if you need. > > ActiveRecord::Base.pluralize_table_names = false > > HTHok, well, is this something i should do ? should i go with the table names pluralized instead of not. I mean, if pluralization is by design, should i change that ? thanks sk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, Just go with the flow. If its a new app and you are in control. Who cares if my table is called ''vehicle'' or ''vehicles''. Check out migrations. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter wrote:> Hi, > > Just go with the flow. > If its a new app and you are in control. > Who cares if my table is called ''vehicle'' or ''vehicles''. > Check out migrations.ok, now my table names are plural, i have users, groups, stations, etc.. so when the scaffold is generated i should have plural controllers ? like users_controller.rb ? and /app/views/users/ and so on. this is all ok? if so, great, i will not sweat it any more. thanks for your help -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Controllers and paths should be the plural of the model name, so you should be on the right track now. On Feb 5, 10:23 am, Shawn Bright <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Peter wrote: > > Hi, > > > Just go with the flow. > > If its a new app and you are in control. > > Who cares if my table is called ''vehicle'' or ''vehicles''. > > Check out migrations. > > ok, now my table names are plural, > i have users, groups, stations, etc.. > so when the scaffold is generated i should have plural controllers ? > like users_controller.rb ? > and /app/views/users/ and so on. this is all ok? > if so, great, i will not sweat it any more. > > thanks for your help > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 5, 2:48 pm, "monki" <gee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Controllers and paths should be the plural of the model name, > so you should be on the right track now. > > On Feb 5, 10:23 am, Shawn Bright <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Peter wrote: > > > Hi, > > > > Just go with the flow. > > > If its a new app and you are in control. > > > Who cares if my table is called ''vehicle'' or ''vehicles''. > > > Check out migrations. > > > ok, now my table names are plural, > > i have users, groups, stations, etc.. > > so when the scaffold is generated i should have plural controllers ? > > like users_controller.rb ? > > and /app/views/users/ and so on. this is all ok? > > if so, great, i will not sweat it any more. > > > thanks for your help > > > -- > > Posted viahttp://www.ruby-forum.com/.way cool, thanks shawn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---