user.rb 262 Bytes
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1
class User < ActiveRecord::Base
2 3
  devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable

Eugen Rochko's avatar
Eugen Rochko committed
4
  belongs_to :account, inverse_of: :user
5
  accepts_nested_attributes_for :account
6

Eugen Rochko's avatar
Eugen Rochko committed
7
  validates :account, presence: true
Eugen Rochko's avatar
Eugen Rochko committed
8
end