Skip to content

Commit

Permalink
Use shorthand of #any?
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung L锚 committed Apr 17, 2012
1 parent cee24f7 commit 22567ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/shipment.rb
Expand Up @@ -123,7 +123,7 @@ def validate_shipping_method
# shipped if already shipped (ie. does not change the state)
# ready all other cases
def determine_state(order)
return 'pending' if self.inventory_units.any? { |unit| unit.backordered? }
return 'pending' if self.inventory_units.any? &:backordered?
return 'shipped' if state == 'shipped'
order.payment_state == 'balance_due' ? 'pending' : 'ready'
end
Expand Down

0 comments on commit 22567ee

Please sign in to comment.