Skip to content

Instantly share code, notes, and snippets.

@superacidjax
Created March 14, 2016 07:41
Show Gist options
  • Save superacidjax/1f4edb69e97abaeac904 to your computer and use it in GitHub Desktop.
Save superacidjax/1f4edb69e97abaeac904 to your computer and use it in GitHub Desktop.
# 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