Class: Item

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/item.rb

Direct Known Subclasses

Cabinet, ParkingClicker

Defined Under Namespace

Modules: EmployeeMethods

Instance Method Summary collapse

Instance Method Details

#assign_with_id!(assignee_id) ⇒ Object



32
33
34
35
36
37
# File 'app/models/item.rb', line 32

def assign_with_id!(assignee_id)
  if assignee_id && self.assign!
    self.assignee_id = assignee_id
    self.save # two saves?
  end
end

#employeeObject



5
6
7
# File 'app/models/item.rb', line 5

def employee
  Employee.unscoped { super }
end