Skip to content

Instantly share code, notes, and snippets.

@tanelsuurhans
Created August 22, 2011 07:51
Show Gist options
  • Save tanelsuurhans/1161884 to your computer and use it in GitHub Desktop.
Save tanelsuurhans/1161884 to your computer and use it in GitHub Desktop.
def reject_purchase_items(attributes)
if attributes["quantity"] == "0"
if attributes["id"].blank?
return true
else
attributes["_destroy"] = true
end
end
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment