Ruby on Rails Thursday, May 31, 2012

On 30 May 2012 10:51, Shalini Sah <shalinisah6692@gmail.com> 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@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?hl=en.

No comments:

Post a Comment