Merge pull request #27 from finnlabs/feature/rails3_fix_postgres_cuke

Defined default order for labor and material budget items being ordered ...
pull/6827/head
cratz 12 years ago
commit 533b9cbce7
  1. 6
      app/models/variable_cost_object.rb

@ -3,10 +3,12 @@ class VariableCostObject < CostObject
has_many :material_budget_items, :include => :cost_type,
:foreign_key => 'cost_object_id',
:dependent => :destroy
:dependent => :destroy,
:order => 'material_budget_items.id ASC'
has_many :labor_budget_items, :include => :user,
:foreign_key => 'cost_object_id',
:dependent => :destroy
:dependent => :destroy,
:order => 'labor_budget_items.id ASC'
validates_associated :material_budget_items
validates_associated :labor_budget_items

Loading…
Cancel
Save