Swap param order

This commit is contained in:
Rohan Mitchell
2014-12-11 15:30:38 +11:00
parent d177f3ff73
commit ca1c116a5d
6 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -1,5 +1,5 @@
class EnterpriseSet < ModelSet
def initialize(collection, attributes={})
super(Enterprise, collection, nil, attributes)
super(Enterprise, collection, attributes)
end
end

View File

@@ -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

View File

@@ -1,5 +1,5 @@
class OrderCycleSet < ModelSet
def initialize(attributes={})
super(OrderCycle, OrderCycle.all, nil, attributes)
super(OrderCycle, OrderCycle.all, attributes)
end
end

View File

@@ -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

View File

@@ -1,5 +1,5 @@
class VariantOverrideSet < ModelSet
def initialize(attributes={})
super(VariantOverride, VariantOverride.all, nil, attributes)
super(VariantOverride, VariantOverride.all, attributes)
end
end