You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason ::ActiveSupport::JSON.parse_error is nil at the point where it is assigned to OEmbed::Formatter::JSON.backend::ParseError and thus you get strange exceptions later. I use Rails 2.3.
Maybe it would be better to change it to a method that reads ::ActiveSupport::JSON.parse_error whenever it is called?
Currently I fix this by adding this initializer:
module OEmbed
module Formatter
module JSON
module Backends
module ActiveSupportJSON
if ParseError.nil?
remove_const(:ParseError)
if ::ActiveSupport::JSON.parse_error.nil?
ParseError = StandardError
else
ParseError = ::ActiveSupport::JSON.parse_error
end
end
end
end
end
end
end
The text was updated successfully, but these errors were encountered:
For some reason ::ActiveSupport::JSON.parse_error is nil at the point where it is assigned to OEmbed::Formatter::JSON.backend::ParseError and thus you get strange exceptions later. I use Rails 2.3.
Maybe it would be better to change it to a method that reads ::ActiveSupport::JSON.parse_error whenever it is called?
Currently I fix this by adding this initializer:
module OEmbed
module Formatter
module JSON
module Backends
module ActiveSupportJSON
if ParseError.nil?
remove_const(:ParseError)
if ::ActiveSupport::JSON.parse_error.nil?
ParseError = StandardError
else
ParseError = ::ActiveSupport::JSON.parse_error
end
end
end
end
end
end
end
The text was updated successfully, but these errors were encountered: