[#416] :class might be nil or a symbol - then + will not work as expected

This commit is contained in:
Gregor Schmidt 2011-05-17 19:03:20 +02:00
parent 2c2ed95866
commit e3f54d470c
1 changed files with 1 additions and 1 deletions

View File

@ -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