Rails Recipes

K

kublaikhan55

Rails Recipes ... has got some very appetizing recipes. However, I have
a hard time starting. For example, the very first recipe,
InPlaceEditing, how and where do I run this code to create the table?

Thanks!

class AddContactsTable < ActiveRecord::Migration
def self.up
create_table :contacts do |t|
t.column :name, :string
t.column :email, :string
t.column :phone, :string
t.column :address_line1, :string
t.column :address_line2, :string
t.column :city, :string
t.column :state, :string
t.column :country, :string
t.column :postal_code, :string
end
end

def self.down
drop_table :contacts
end
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top