Created
August 13, 2012 00:00
-
-
Save naudo/3335568 to your computer and use it in GitHub Desktop.
Models for this is why your app is slow.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Schema Information | |
# | |
# Table name: pets | |
# | |
# id :integer not null, primary key | |
# name :string(255) | |
# user_id :integer | |
# created_at :datetime not null | |
# updated_at :datetime not null | |
# | |
class Pet < ActiveRecord::Base | |
attr_accessible :name | |
belongs_to :user | |
end | |
# == Schema Information | |
# | |
# Table name: users | |
# | |
# id :integer not null, primary key | |
# name :string(255) | |
# address :text | |
# created_at :datetime not null | |
# updated_at :datetime not null | |
# | |
class User < ActiveRecord::Base | |
attr_accessible :address, :name | |
has_many :pets | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment