X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aa821971ddea3b2d5dce337728c624bd4b14b298..25d5c58c5c8902812731ef8d202dd2f015771cb1:/app/helpers/application_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d27b47f27..adcf5c6c0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,9 +3,9 @@ module ApplicationHelper def linkify(text) if text.html_safe? - Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow")).html_safe + Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow")).html_safe else - Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow")) + Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow")) end end @@ -40,9 +40,7 @@ module ApplicationHelper end def if_user(user, tag = :div, &block) - if user - content_tag(tag, capture(&block), :class => "hidden show_if_user_#{user.id}") - end + content_tag(tag, capture(&block), :class => "hidden show_if_user_#{user.id}") if user end def unless_user(user, tag = :div, &block) @@ -110,9 +108,7 @@ module ApplicationHelper if current_user data[:user] = current_user.id.to_json - unless current_user.home_lon.nil? || current_user.home_lat.nil? - data[:user_home] = { :lat => current_user.home_lat, :lon => current_user.home_lon } - end + data[:user_home] = { :lat => current_user.home_lat, :lon => current_user.home_lon } unless current_user.home_lon.nil? || current_user.home_lat.nil? end data[:location] = session[:location] if session[:location]