You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/lib/active_support_json_proxy.rb

14 lines
280 B
Ruby

# Remove this and replace with `JSON` after upgrading to Rails 4.2
class ActiveSupportJsonProxy
def self.dump(object)
ActiveSupport::JSON.encode(object) unless object.nil?
end
def self.load(string)
ActiveSupport::JSON.decode(string) if string.present?
end
end