Advertisement
heroku

Untitled

Dec 15th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.35 KB | None | 0 0
  1. def user_json(user)
  2.   {
  3.    'display_name' => user.display_name,
  4.    'reputation' => user.reputation unless user.reputation,
  5.    'age' => user.age, unless user.age
  6.    'location' => user.location, unless user.location
  7.    'website_url' => user.website_url, unless user.website_url
  8.    'profile_image' => user.profile_image, unless user.profile_image
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement