mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Only undef to_json if it's defined
This commit is contained in:
@@ -95,7 +95,7 @@ module ActionController #:nodoc:
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user