Permalink
Browse files

using to_query to convert hash to paypal url in episode 141

  • Loading branch information...
1 parent 3d1f55b commit d727ff5d2112bd4bd8775f640283c2772fdac7ee @ryanb committed Dec 22, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 episode-141/store/app/models/cart.rb
@@ -22,6 +22,6 @@ def paypal_url(return_url)
"quantity_#{index+1}" => item.quantity
})
end
- "https://www.sandbox.paypal.com/cgi-bin/webscr?"+values.map {|k,v| "#{k}=#{v}" }.join("&")
+ "https://www.sandbox.paypal.com/cgi-bin/webscr?" + values.to_query
end
end

0 comments on commit d727ff5

Please sign in to comment.