]> source.dussan.org Git - redmine.git/commitdiff
Don't compare with Hash.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Jul 2016 09:41:24 +0000 (09:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Jul 2016 09:41:24 +0000 (09:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15670 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/watchers_controller.rb

index 818ed3597494accd398d2f915b0ae7033d1f35f6..7ea56999bdda0b63b67385539616bf4402d5c843 100644 (file)
@@ -35,7 +35,7 @@ class WatchersController < ApplicationController
 
   def create
     user_ids = []
-    if params[:watcher].is_a?(Hash)
+    if params[:watcher]
       user_ids << (params[:watcher][:user_ids] || params[:watcher][:user_id])
     else
       user_ids << params[:user_id]
@@ -54,7 +54,7 @@ class WatchersController < ApplicationController
   end
 
   def append
-    if params[:watcher].is_a?(Hash)
+    if params[:watcher]
       user_ids = params[:watcher][:user_ids] || [params[:watcher][:user_id]]
       @users = User.active.visible.where(:id => user_ids).to_a
     end