Guest User

Untitled

a guest
Jul 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. ## Encode
  2. json = ActiveSupport::JSON.encode(object) # extra methods like :include
  3. json = Offering.first.to_json(:include => :outlet, :methods => [:days_waiting])
  4.  
  5. ## Decode
  6. ActiveSupport::JSON.decode(json)
Add Comment
Please, Sign In to add comment