Merged rails-4.1 branch (#14534).

git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-10-22 17:37:16 +00:00
parent a6ec78a4dc
commit 2d1866d966
331 changed files with 2540 additions and 6138 deletions

View File

@@ -27,13 +27,13 @@ class GroupsController < ApplicationController
def index
respond_to do |format|
format.html {
@groups = Group.sorted.all
@groups = Group.sorted.to_a
@user_count_by_group_id = user_count_by_group_id
}
format.api {
scope = Group.sorted
scope = scope.givable unless params[:builtin] == '1'
@groups = scope.all
@groups = scope.to_a
}
end
end
@@ -95,7 +95,7 @@ class GroupsController < ApplicationController
end
def add_users
@users = User.where(:id => (params[:user_id] || params[:user_ids])).all
@users = User.where(:id => (params[:user_id] || params[:user_ids])).to_a
@group.users << @users if request.post?
respond_to do |format|
format.html { redirect_to edit_group_path(@group, :tab => 'users') }