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@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.

Search Discussions

  • Colin Law at May 31, 2012 at 12:57 pm

    On 30 May 2012 10:51, Shalini Sah 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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 31, '12 at 12:42p
activeMay 31, '12 at 12:57p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Colin Law: 1 post Shalini Sah: 1 post

People

Translate

site design / logo © 2021 Grokbase