Navigation Menu

Skip to content

Commit

Permalink
Don't rescue from User::DestroyWithOrdersError if it is not defined. F…
Browse files Browse the repository at this point in the history
…ixes spree#1155
  • Loading branch information
radar committed Feb 20, 2012
1 parent e44aa27 commit 3a6f5d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/app/controllers/spree/admin/users_controller.rb
@@ -1,7 +1,9 @@
module Spree
module Admin
class UsersController < ResourceController
rescue_from User::DestroyWithOrdersError, :with => :user_destroy_with_orders_error
if User.const_defined?(DestroyWithOrdersError)
rescue_from User::DestroyWithOrdersError, :with => :user_destroy_with_orders_error
end

# http://spreecommerce.com/blog/2010/11/02/json-hijacking-vulnerability/
before_filter :check_json_authenticity, :only => :index
Expand Down

0 comments on commit 3a6f5d3

Please sign in to comment.