Skip to content

Commit

Permalink
Only undef to_json if it's defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Oct 20, 2009
1 parent acb1624 commit 418ce48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/responder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def initialize(controller, resources, options={})
delegate :get?, :post?, :put?, :delete?, :to => :request

# Undefine :to_json since it's defined on Object
undef_method :to_json
undef_method(:to_json) if method_defined?(:to_json)

# Initializes a new responder an invoke the proper format. If the format is
# not defined, call to_format.
Expand Down

0 comments on commit 418ce48

Please sign in to comment.