Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def as_json(options = nil)
- {
- :name => user.name,
- :dob => user.dob
- :created_at => user.created_at,
- :url => user
- }
- end
- format.json { render :json => UserJsonDecorator.new(@user)}
- UserJsonDecorator.new(@user,options)
- UserJsonDecorator.new(@user).to_json(options)
Add Comment
Please, Sign In to add comment