Folks, I am new to rails. I have tried Google searches, checked the tips and doco and can''t find the answer to a simple question. I have a table called "Activity" that I want to rename so I can use RubyOnRails but I don''t know whether the plural form should be "Activitys" or "Activities". Can someone illuminate me on what to do? regards Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello Simon,> I am new to rails. I have tried Google searches, checked the tips and > doco and can't find the answer to a simple question. > > I have a table called "Activity" that I want to rename so I can use > RubyOnRails but I don't know whether the plural form should be > "Activitys" or "Activities".$ script/console Loading development environment.>> "activity".pluralize=> "activities" so you can name your table 'activities' (downcased) Note that if the pluralization didn't fit to you, you can change it with Inflector (see config/environment.rb explanations) -- Jean-François. -- À la renverse. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 10/26/06, SpatialDB Advisor <sgreener-ooduxAEi7gXtt0EhB6fy4g@public.gmane.org> wrote:> > I am new to rails. I have tried Google searches, checked the tips and > doco and can''t find the answer to a simple question. > > I have a table called "Activity" that I want to rename so I can use > RubyOnRails but I don''t know whether the plural form should be > "Activitys" or "Activities".Hey Simon! Check this out: jeremy@ks editors $ ./script/console Loading development environment.>> "activity".pluralize=> "activities">>The Rails console is your new best friend. It''s just the Ruby interactive shell (irb) with your Rails app already all loaded up for you to play with interactively. You can even create classes dynamically and see the results:>> class Activity < ActiveRecord::Base; end=> nil>> Activity.table_name=> "activities">> Activity.columns=> [would have the columns here if I had an activities table] Can someone illuminate me on what to do? Take yourself out for a beer to celebrate your ./script/console discovery. Best, jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/27/06, SpatialDB Advisor <sgreener-ooduxAEi7gXtt0EhB6fy4g@public.gmane.org> wrote:> > > Folks, > > I am new to rails. I have tried Google searches, checked the tips and > doco and can''t find the answer to a simple question. > > I have a table called "Activity" that I want to rename so I can use > RubyOnRails but I don''t know whether the plural form should be > "Activitys" or "Activities". > > Can someone illuminate me on what to do?The pluraliser in rails will use activities as the plural version of activity. There is some information on creating custom pluralisations here http://blog.hasmanythrough.com/articles/2006/05/17/pluralizations Hope that helps --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
To all who replied so promptly: thank you! I see there are many RubyOnRails books out there. I am not a database beginner (I have been using Oracle for nearly 20 years) though I am a Ruby novice. I know enough about web development to make a real pro wince! I am at home in most data modelling tools (but a UML novice). So, anyone recommend a book or books that will get me up and running fast I would be appreciative. regards Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Simon, I would highly recommend, at a minimum, getting a copy of the PDF both ''Programming Ruby'' and ''Agile Web Development with Rails 2ed'' from pragmaticprogrammer.com. Good luck, -Conrad On 10/26/06, SpatialDB Advisor <sgreener-ooduxAEi7gXtt0EhB6fy4g@public.gmane.org> wrote:> > To all who replied so promptly: thank you! > > I see there are many RubyOnRails books out there. > > I am not a database beginner (I have been using Oracle for nearly 20 > years) though I am a Ruby novice. I know enough about web development > to make a real pro wince! I am at home in most data modelling tools > (but a UML novice). So, anyone recommend a book or books that will get > me up and running fast I would be appreciative. > > regards > Simon > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the suggestions. Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---