app/models/dated_cost.rb in e9_crm-0.1.13 vs app/models/dated_cost.rb in e9_crm-0.1.14

- old
+ new

@@ -10,9 +10,13 @@ validates :date, :date => true validates :cost, :numericality => { :greater_than => 0 } attr_accessor :temp_id + def self.default_scope + order('dated_costs.created_at ASC') + end + def as_json(options={}) {}.tap do |hash| hash[:id] = self.id hash[:cost] = self.cost hash[:date] = self.date