Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Account < ActiveRecord::Base
- has_many :users, dependent: :destroy
- validates :name, presence: true, length: { maximum: 100 }
- end
- class User < ActiveRecord::Base
- belongs_to :account
- validates :account_id, presence: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement