Skip to content

Instantly share code, notes, and snippets.

@twinge
Created December 31, 2011 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twinge/1542657 to your computer and use it in GitHub Desktop.
Save twinge/1542657 to your computer and use it in GitHub Desktop.
weirdness on setting commissions
# set commission only for non artists or artists whose not buying their own art
Rails.logger.debug '*' * 100
Rails.logger.debug "artist id: #{User.current.artist.id} product id: #{li.product.id} (#{!User.current.artist}) || (#{User.current.artist && !User.current.artist.products.include?(li.product)})"
li.set_commissions if !User.current.artist || (User.current.artist && !User.current.artist.products.include?(li.product))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment