Hi, I have a database with multiple tables. How do I directly pick the information from the database and populate my model folder with classes instead of doing it manually? Can some one direct me to the specific set of commands for this. Thanks & Regards, Shalini -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 30 May 2012 10:51, Shalini Sah <shalinisah6692-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I have a database with multiple tables. How do I directly pick the > information from the database and populate my model folder with > classes instead of doing it manually? Can some one direct me to the > specific set of commands for this.There may be a way of doing this but I do not know it. Note though that it is easy to do by hand. For each table (table widgets for example) make a file widget.rb and in there put class Widget < ActiveRecord::Base end Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.