17 lines
458 B
Ruby
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
|