RailsCasts Pro episodes are now free!

Learn more or hide this

Jeroen Zwartepoorte's Profile

GitHub User: jpzwarte

Comments by Jeroen Zwartepoorte

Avatar

Why not use the presence method to make the avatar_name method a 1-liner?

ruby
def avatar_name
  model.avatar_image_name.presence || 'default.png'
end