Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Encode
- json = ActiveSupport::JSON.encode(object) # extra methods like :include
- json = Offering.first.to_json(:include => :outlet, :methods => [:days_waiting])
- ## Decode
- ActiveSupport::JSON.decode(json)
Add Comment
Please, Sign In to add comment