From e3f54d470c2d258bd38d5aaaa1c16ba09b27ca31 Mon Sep 17 00:00:00 2001 From: Gregor Schmidt <ruby@schmidtwisser.de> Date: Tue, 17 May 2011 19:03:20 +0200 Subject: [PATCH] [#416] :class might be nil or a symbol - then + will not work as expected --- app/helpers/watchers_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index bd716d370..5c00bff04 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -49,7 +49,7 @@ module WatchersHelper url_options = {:url => url} html_options = options.merge(:href => url_for(url)) - html_options[:class] += watched ? ' icon icon-fav' : ' icon icon-fav-off' + html_options[:class] = html_options[:class].to_s + (watched ? ' icon icon-fav' : ' icon icon-fav-off') link_to_remote((watched ? l(:button_unwatch) : l(:button_watch)), url_options, html_options) end -- GitLab