Skip to content

Instantly share code, notes, and snippets.

@dabit
Created September 28, 2011 16:11
Show Gist options
  • Save dabit/1248362 to your computer and use it in GitHub Desktop.
Save dabit/1248362 to your computer and use it in GitHub Desktop.
def display_item(item)
to_return = []
if item.upc?
if item.item
to_return << item.quantity
to_return << "<a href='#{edit_admin_product_path(item.item.product.id)}'>#{item.item.product.name}</a>"
to_return << item.item.product_attribute.name
to_return << item.item.size.name
end
else
to_return << "Gift certificate"
end
raw to_return
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment