work off today
This commit is contained in:
@@ -8,8 +8,8 @@ class NewSupplier
|
||||
attribute :password
|
||||
attribute :password_confirmation
|
||||
|
||||
without_current_employee = { unless: 'current_employee.present?' }
|
||||
without_employee = { unless: 'employee.present?' }
|
||||
without_current_employee = { unless: -> { current_employee.present? } }
|
||||
without_employee = { unless: -> { employee.present? } }
|
||||
validates :supplier_name, presence: true
|
||||
validates :email, email: without_current_employee
|
||||
validates :password, presence: without_current_employee, confirmation: without_employee
|
||||
|
||||
Reference in New Issue
Block a user