CRUDcommissioner

This commit is contained in:
yamin
2017-08-21 16:12:59 +06:30
parent 3b5eb532d3
commit 25e6039a9f
10 changed files with 105 additions and 33 deletions

View File

@@ -1,2 +1,3 @@
class Commissioner < ApplicationRecord
has_many :employees
end

View File

@@ -1,6 +1,6 @@
class Employee < ApplicationRecord
has_secure_password
belongs_to :commissioner
has_many :shit_sales
validates_presence_of :name, :role
validates_presence_of :password, :on => [:create]