Hi, In my application I''m using gravatar_image_tag to retrieve user''s avatar. I would like to show a custom image(registered in my assets directory) in case that user do not have an gravatar account. How could I do it? thx Bruno Meira -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
read or watch Ryan Bates RailsCasts episode #244: http://railscasts.com/episodes/244-gravatar?view=asciicast On Feb 15, 5:39 pm, Bruno Meira <goesme...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > In my application I''m using gravatar_image_tag to retrieve user''s avatar. > I would like to show a custom image(registered in my assets directory) in > case that user do not have an gravatar account. > How could I do it? > > thx > Bruno Meira-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thx soldier, I will take a look :D -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
its about 4 minutes in. On Feb 15, 9:03 pm, Bruno Meira <goesme...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thx soldier, > I will take a look :D-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The gravatar_image_tag gem has a configuration point for setting your own default image rather then using the Gravatar default. You can do it inline like so: gravatar_image_tag(''junk-zuv13RyHHZkAvxtiuMwx3w@public.gmane.org'', :gravatar => { :default => ''http://example.com/images/your.png'' }) Or you configure it globally in an initializer # config/initilizers/gravatar_image_tag.rb GravatarImageTag.configure do |config| config.default_image = ''http://example.com/images/your.png'' end Refer to the README for more information https://github.com/mdeering/gravatar_image_tag -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.