Permalink
Browse files

Convert permalink to string to make postgres happy when finding a pro…

…duct
  • Loading branch information...
1 parent 279dca0 commit 765db7cb63d8c97e08e088c3759da4f389f80a06 @radar radar committed Jun 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 api/app/controllers/spree/api/v1/base_controller.rb
@@ -59,7 +59,7 @@ def api_key
def find_product(id)
begin
- product_scope.find_by_permalink!(id)
+ product_scope.find_by_permalink!(id.to_s)
rescue ActiveRecord::RecordNotFound
product_scope.find(id)
end

0 comments on commit 765db7c

Please sign in to comment.