cleanup syntax of Relation#all at MembersController#index

git-svn-id: http://svn.redmine.org/redmine/trunk@12601 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-10 10:30:33 +00:00
parent fe6ef59e37
commit 72715ec78e
1 changed files with 5 additions and 6 deletions

View File

@ -28,12 +28,11 @@ class MembersController < ApplicationController
@member_count = @project.member_principals.count
@member_pages = Paginator.new @member_count, @limit, params['page']
@offset ||= @member_pages.offset
@members = @project.member_principals.all(
:order => "#{Member.table_name}.id",
:limit => @limit,
:offset => @offset
)
@members = @project.member_principals.
order("#{Member.table_name}.id").
limit(@limit).
offset(@offset).
all
respond_to do |format|
format.html { head 406 }
format.api