summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-01 11:44:53 -0700
committermo khan <mo@mokhan.ca>2013-07-01 11:44:53 -0700
commitd07f64c2435168339c2d3ca071395efa0eceffed (patch)
tree6c9b9200c1e6291f3b4dbea20cf8266eca76f4f8 /app/helpers
parentaae581257b12d0c1dfdefb74b9d4349d4cfe6127 (diff)
highlight the appropriate tab in the settings section
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b9a61e99..57d25f4c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,10 +1,7 @@
module ApplicationHelper
def avatar_for(user, options = {size:260, class:''})
- if user.avatar == nil
- return gravatar_for(user, options)
- else
- image_tag(user.avatar.avatar.thumb.url, alt: user.name, class: options[:class], :style => "width:#{options[:size]}px;")
- end
+ return gravatar_for(user, options) unless user.avatar
+ image_tag(user.avatar.avatar.thumb.url, alt: user.name, class: options[:class], :style => "width:#{options[:size]}px;")
end
def gravatar_for(user, options = { size: 260 })