Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- has_one :safe
- has_many :contacts
- end
- class Safe < ActiveRecord::Base
- belongs_to :user
- end
- class CreateSafes < ActiveRecord::Migration
- def change
- create_table :saves do |t|
- t.string :safe_key
- t.timestamps
- end
- end
- end
- class CreateUsers < ActiveRecord::Migration
- def change
- create_table :users do |t|
- t.string :email
- t.string :password
- t.timestamps
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement