Commit a2333d71 authored by jplang's avatar jplang

Don't compare with Hash.

git-svn-id: https://svn.redmine.org/redmine/trunk@15670 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3c34bbee
...@@ -35,7 +35,7 @@ class WatchersController < ApplicationController ...@@ -35,7 +35,7 @@ class WatchersController < ApplicationController
def create def create
user_ids = [] user_ids = []
if params[:watcher].is_a?(Hash) if params[:watcher]
user_ids << (params[:watcher][:user_ids] || params[:watcher][:user_id]) user_ids << (params[:watcher][:user_ids] || params[:watcher][:user_id])
else else
user_ids << params[:user_id] user_ids << params[:user_id]
...@@ -54,7 +54,7 @@ class WatchersController < ApplicationController ...@@ -54,7 +54,7 @@ class WatchersController < ApplicationController
end end
def append def append
if params[:watcher].is_a?(Hash) if params[:watcher]
user_ids = params[:watcher][:user_ids] || [params[:watcher][:user_id]] user_ids = params[:watcher][:user_ids] || [params[:watcher][:user_id]]
@users = User.active.visible.where(:id => user_ids).to_a @users = User.active.visible.where(:id => user_ids).to_a
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment