Guest User

Untitled

a guest
Jan 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def as_json(options = nil)
  2. {
  3. :name => user.name,
  4. :dob => user.dob
  5. :created_at => user.created_at,
  6. :url => user
  7. }
  8. end
  9.  
  10. format.json { render :json => UserJsonDecorator.new(@user)}
  11.  
  12. UserJsonDecorator.new(@user,options)
  13.  
  14. UserJsonDecorator.new(@user).to_json(options)
Add Comment
Please, Sign In to add comment