Hi Hamad,

We believe a default is a concern closer to the view, better addressed with
a view helper for example:

    def user_avatar(user)
      user.avatar || default_user_avatar
    end

In the case of the recent trend of dummy avatars with letters in them, that
default would even depend on the user.

Then, views consistently use this helper instead of user.avatar.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to