]> source.dussan.org Git - redmine.git/commitdiff
Fixes acts_as_event with a String as url option (#5343).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Apr 2010 10:00:11 +0000 (10:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 18 Apr 2010 10:00:11 +0000 (10:00 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3681 e93f8b46-1217-0410-a6f0-8f06a7374b81

vendor/plugins/acts_as_event/lib/acts_as_event.rb

index 1aa7ddf01c24b1678596b3b6d51cecb527439254..364bb8cef5fa8d1dd1d4778d43092ab0e1cef764 100644 (file)
@@ -65,7 +65,15 @@ module Redmine
         
         def event_url(options = {})
           option = event_options[:url]
-          (option.is_a?(Proc) ? option.call(self) : send(option)).merge(options)
+          if option.is_a?(Proc)
+            option.call(self)
+          elsif option.is_a?(Hash)
+            option.merge(options)
+          elsif option.is_a?(Symbol)
+            send(option)
+          else
+            option
+          end
         end
 
         # Returns the mail adresses of users that should be notified