Mercurial > hg > soundsoftware-site
changeset 1140:59fd55892a7b redmine-2.2-integration
Restore rendering of members list
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 10 Jan 2013 15:23:35 +0000 |
parents | 5e476516ffea |
children | c852c89f5de1 |
files | app/controllers/members_controller.rb |
diffstat | 1 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/members_controller.rb Thu Jan 10 15:11:59 2013 +0000 +++ b/app/controllers/members_controller.rb Thu Jan 10 15:23:35 2013 +0000 @@ -25,19 +25,21 @@ accept_api_auth :index, :show, :create, :update, :destroy def index - @offset, @limit = api_offset_and_limit - @member_count = @project.member_principals.count - @member_pages = Paginator.new self, @member_count, @limit, params['page'] - @offset ||= @member_pages.current.offset - @members = @project.member_principals.all( - :order => "#{Member.table_name}.id", - :limit => @limit, - :offset => @offset - ) - respond_to do |format| - format.html { head 406 } - format.api + format.html { + render :layout => false if request.xhr? + } + format.api { + @offset, @limit = api_offset_and_limit + @member_count = @project.member_principals.count + @member_pages = Paginator.new self, @member_count, @limit, params['page'] + @offset ||= @member_pages.current.offset + @members = @project.member_principals.all( + :order => "#{Member.table_name}.id", + :limit => @limit, + :offset => @offset + ) + } end end