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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.