Files
mozo-backend/app/models/employee.rb
T
2015-02-16 17:53:01 +01:00

17 lines
458 B
Ruby

class Employee
include SimplyStored::Couch
include ActiveModel::SerializerSupport
devise :database_authenticatable, :recoverable, :rememberable, :trackable #, :omniauthable, :omniauth_providers => [:facebook] #, :token_authenticatable , :registerable
property :name
property :email
view :by_email, key: :email
validates :email, email: true
belongs_to :supplier
has_many :orders
has_and_belongs_to_many :lists, storing_keys: false
end