app/models/bookkeeper/purchase.rb in bookkeeper-0.0.1 vs app/models/bookkeeper/purchase.rb in bookkeeper-0.0.2
- old
+ new
@@ -5,7 +5,9 @@
attr_accessible :description, :purchase_date, :title, :warranty_duration, :receipt
validates_presence_of :title
validates_numericality_of :warranty_duration, allow_nil: true
validates_date :purchase_date, allow_nil: true, allow_blank: true
+
+ default_scope order('created_at DESC')
end
end