End of day commit
This commit is contained in:
+13
-4
@@ -2,14 +2,23 @@ class Employee
|
||||
include SimplyStored::Couch
|
||||
include ActiveModel::SerializerSupport
|
||||
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable #, :omniauthable, :omniauth_providers => [:facebook] #, :token_authenticatable , :registerable
|
||||
view :by_confirmation_token, key: :confirmation_token # devise confirmable
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :confirmable
|
||||
property :unconfirmed_email
|
||||
|
||||
property :name
|
||||
property :email
|
||||
#property :email
|
||||
|
||||
view :by_email, key: :email
|
||||
|
||||
validates :email, email: true
|
||||
belongs_to :supplier
|
||||
class << self
|
||||
def count_by_email(email)
|
||||
database.view by_email(key: email, reduce: true)
|
||||
end
|
||||
end
|
||||
|
||||
#validates :email, email: true
|
||||
has_and_belongs_to_many :suppliers, storing_keys: false
|
||||
has_many :orders
|
||||
has_and_belongs_to_many :lists, storing_keys: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user