Module: Twitter::Rails::Helpers
- Defined in:
- lib/twitter/rails/helpers.rb
Instance Method Summary collapse
Instance Method Details
#twitter_profile_pic(user, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/twitter/rails/helpers.rb', line 5 def twitter_profile_pic(user, ={}) id = user.respond_to?(:twitter_id) ? user.twitter_id : user begin image_url = Twitter::Base.new.user(id).profile_image_url rescue image_url = "http://static.twitter.com/images/default_profile_normal.png" end image_tag(image_url, ) end |