diff --git a/app/models/enterprise_fee_set.rb b/app/models/enterprise_fee_set.rb index fdefeec277..e7cf857936 100644 --- a/app/models/enterprise_fee_set.rb +++ b/app/models/enterprise_fee_set.rb @@ -1,7 +1,7 @@ class EnterpriseFeeSet < ModelSet def initialize(attributes={}) super(EnterpriseFee, EnterpriseFee.all, - proc { |attrs| attrs[:name].blank? }, - attributes) + attributes, + proc { |attrs| attrs[:name].blank? }) end end diff --git a/app/models/enterprise_set.rb b/app/models/enterprise_set.rb index 0eef0ea3c8..123a6b5eed 100644 --- a/app/models/enterprise_set.rb +++ b/app/models/enterprise_set.rb @@ -1,5 +1,5 @@ class EnterpriseSet < ModelSet def initialize(collection, attributes={}) - super(Enterprise, collection, nil, attributes) + super(Enterprise, collection, attributes) end end diff --git a/app/models/model_set.rb b/app/models/model_set.rb index 24e84008a0..774b94beb8 100644 --- a/app/models/model_set.rb +++ b/app/models/model_set.rb @@ -5,7 +5,7 @@ class ModelSet attr_accessor :collection - def initialize(klass, collection, reject_if=nil, attributes={}) + def initialize(klass, collection, attributes={}, reject_if=nil) @klass, @collection, @reject_if = klass, collection, reject_if # Set here first, to ensure that we apply collection_attributes to the right collection diff --git a/app/models/order_cycle_set.rb b/app/models/order_cycle_set.rb index f83f40f029..d76eb8ef80 100644 --- a/app/models/order_cycle_set.rb +++ b/app/models/order_cycle_set.rb @@ -1,5 +1,5 @@ class OrderCycleSet < ModelSet def initialize(attributes={}) - super(OrderCycle, OrderCycle.all, nil, attributes) + super(OrderCycle, OrderCycle.all, attributes) end end diff --git a/app/models/spree/product_set.rb b/app/models/spree/product_set.rb index d6f361c82e..9b4b771f37 100644 --- a/app/models/spree/product_set.rb +++ b/app/models/spree/product_set.rb @@ -1,6 +1,6 @@ class Spree::ProductSet < ModelSet def initialize(attributes={}) - super(Spree::Product, [], proc { |attrs| attrs[:product_id].blank? }, attributes) + super(Spree::Product, [], attributes, proc { |attrs| attrs[:product_id].blank? }) end # A separate method of updating products was required due to an issue with the way Rails' assign_attributes and updates_attributes behave when delegated attributes of a nested diff --git a/app/models/variant_override_set.rb b/app/models/variant_override_set.rb index cf36ee547b..bdd0301dcb 100644 --- a/app/models/variant_override_set.rb +++ b/app/models/variant_override_set.rb @@ -1,5 +1,5 @@ class VariantOverrideSet < ModelSet def initialize(attributes={}) - super(VariantOverride, VariantOverride.all, nil, attributes) + super(VariantOverride, VariantOverride.all, attributes) end end