Created
March 14, 2016 07:41
-
-
Save superacidjax/1f4edb69e97abaeac904 to your computer and use it in GitHub Desktop.
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
# just FYI, ApplicationRecord is a new rails 5 thing, | |
# It is a superclass for your models that inherit from ActiveRecord::Base | |
# It's purpose is to reduce the need for monkey patching ActiveRecord::Base directly | |
class Person < ApplicationRecord | |
belongs_to :account | |
end | |
class Account < ApplicationRecord | |
has_many :users | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment