Skip to content

Commit

Permalink
Convert permalink to string to make postgres happy when finding a pro…
Browse files Browse the repository at this point in the history
…duct
  • Loading branch information
radar committed Jun 1, 2012
1 parent 279dca0 commit 765db7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/app/controllers/spree/api/v1/base_controller.rb
Expand Up @@ -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
Expand Down

0 comments on commit 765db7c

Please sign in to comment.