Created
February 22, 2009 00:55
-
-
Save railsdog/68271 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def available?(order) | |
special_categories = ShippingCategory.find(:all, :conditions => ["name IN ('TV', 'Medium Size TV', 'Oversized TV')"]) | |
order.line_items.each do |line_item| | |
product = line_item.variant.product | |
return false if special_categories.include?(product.shipping_category) | |
end | |
true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment