Rails won’t automatically create a schema for you, unless you define
For instance, if you have a table called users, and the table name is
users, add this model to your models folder
file name: users.rb
class User < ActiveRecord::Base
You don’t need to run rake db:migrate unless you want to do a
migration (ie execute some code that does some stuff to the database).
You can probably get around using hyphenated names by using table_name
‘whatever-hyphenated-table-name’ like that under the beginning of the
class. (I think that’s the right syntax).
Each model you have (one per table) will wrapper a table.
Learn about Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME)