serializer stuff
This commit is contained in:
@@ -37,6 +37,10 @@ class Employee
|
||||
end
|
||||
end
|
||||
|
||||
def to_hash
|
||||
attributes.merge(settings.as_json).merge("id" => id)
|
||||
end
|
||||
|
||||
#validates :email, email: true
|
||||
has_and_belongs_to_many :suppliers, storing_keys: false
|
||||
has_many :orders
|
||||
|
||||
Reference in New Issue
Block a user