Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor image_url method.

Since options is a class variable, there's no need to pass it as an
argument.
  • Loading branch information...
commit aa43b8969a7efd2534abbd27fa4f9c87560504d5 1 parent c4d6570
@guilhermesimoes guilhermesimoes authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/omniauth/strategies/twitter.rb
View
4 lib/omniauth/strategies/twitter.rb
@@ -17,7 +17,7 @@ class Twitter < OmniAuth::Strategies::OAuth
:nickname => raw_info['screen_name'],
:name => raw_info['name'],
:location => raw_info['location'],
- :image => image_url(options),
+ :image => image_url,
:description => raw_info['description'],
:urls => {
'Website' => raw_info['url'],
@@ -62,7 +62,7 @@ def request_phase
private
- def image_url(options)
+ def image_url
original_url = options[:secure_image_url] ? raw_info['profile_image_url_https'] : raw_info['profile_image_url']
case options[:image_size]
when 'mini'
Please sign in to comment.
Something went wrong with that request. Please try again.