I have a Mysql database with a large amount of data and tables. But i need to know how to use this Mysql data in the my new rails application. I've been learning Rails from a little time now. i know the basics of creating a scaffold which in turn creates models and controllers, but i'm unclear how to import a DB and use it. Can anyone explain or provide me with a link on how to get over this.
This is my migration after running a simple scaffold and i ran rake db:migrate
after adding an email string there and nothing happened..:
class CreateProducts < ActiveRecord::Migration
def change
create_table :products do |t|
t.string :title
t.text :description
t.string :image_url
t.decimal :price, :precision => 8, :scale => 2
>> t.string :email
t.timestamps
end
end
end