def destroy
      unless @question_sheet.pages.length <= 1
        @page = @question_sheet.pages.find(params[:id])
        @page.destroy

        @all_pages = @question_sheet.pages.find(:all)
        @page = @all_pages[0]
    
        respond_to do |format|
          format.js
        end
      end
    end
def destroy
      unless @question_sheet.pages.length <= 1
        @page = @question_sheet.pages.find(params[:id])
        @page.destroy

        @all_pages = @question_sheet.pages.find(:all)
        @page = @all_pages[0]
    
        respond_to do |format|
          format.js
        end
      end
    end
DELETE /pages/1