Class: ActiveRecord::Coders::JSON
- Inherits:
-
Object
- Object
- ActiveRecord::Coders::JSON
- Defined in:
- lib/active_record/coders/json.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.dump(obj) ⇒ Object
6 7 8 |
# File 'lib/active_record/coders/json.rb', line 6 def self.dump(obj) ActiveSupport::JSON.encode(obj) end |
.load(json) ⇒ Object
10 11 12 |
# File 'lib/active_record/coders/json.rb', line 10 def self.load(json) ActiveSupport::JSON.decode(json) unless json.blank? end |