# HG changeset patch # User Chris Cannam # Date 1357831415 0 # Node ID 59fd55892a7b8a6ad8d3ebb17acb452251bd654d # Parent 5e476516ffea2094cf24ea6dde7edbfb8662d563 Restore rendering of members list diff -r 5e476516ffea -r 59fd55892a7b app/controllers/members_controller.rb --- 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