mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 15:56:03 +01:00
use "do end" instead of {} at GroupsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20303 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,7 +32,7 @@ class GroupsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html do
|
||||||
scope = Group.sorted
|
scope = Group.sorted
|
||||||
scope = scope.like(params[:name]) if params[:name].present?
|
scope = scope.like(params[:name]) if params[:name].present?
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ class GroupsController < ApplicationController
|
|||||||
@group_pages = Paginator.new @group_count, per_page_option, params['page']
|
@group_pages = Paginator.new @group_count, per_page_option, params['page']
|
||||||
@groups = scope.limit(@group_pages.per_page).offset(@group_pages.offset).to_a
|
@groups = scope.limit(@group_pages.per_page).offset(@group_pages.offset).to_a
|
||||||
@user_count_by_group_id = user_count_by_group_id
|
@user_count_by_group_id = user_count_by_group_id
|
||||||
}
|
end
|
||||||
format.api {
|
format.api do
|
||||||
scope = Group.sorted
|
scope = Group.sorted
|
||||||
scope = scope.givable unless params[:builtin] == '1'
|
scope = scope.givable unless params[:builtin] == '1'
|
||||||
@groups = scope.to_a
|
@groups = scope.to_a
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -117,13 +117,13 @@ class GroupsController < ApplicationController
|
|||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to edit_group_path(@group, :tab => 'users') }
|
format.html { redirect_to edit_group_path(@group, :tab => 'users') }
|
||||||
format.js
|
format.js
|
||||||
format.api {
|
format.api do
|
||||||
if @users.any?
|
if @users.any?
|
||||||
render_api_ok
|
render_api_ok
|
||||||
else
|
else
|
||||||
render_api_errors "#{l(:label_user)} #{l('activerecord.errors.messages.invalid')}"
|
render_api_errors "#{l(:label_user)} #{l('activerecord.errors.messages.invalid')}"
|
||||||
end
|
end
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user