Class: SimpleItem
- Inherits:
-
Item
- Object
- ActiveRecord::Base
- Item
- SimpleItem
show all
- Defined in:
- app/models/simple_item.rb
Class Method Summary
collapse
Methods inherited from Item
#before_validation, #validate
Class Method Details
.find_conflict(item) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'app/models/simple_item.rb', line 10
def self.find_conflict(item)
Item.all(:conditions => {
:type => item.type,
:date => item.date,
:account_id => item.account_id,
:category_id => item.category_id,
:position => item.position,
}).reject{|x| x.id == item.id}.first
end
|