diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 8dc7bc3..b588d3b 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -3,7 +3,8 @@ class ArticlesController < ApplicationController def index @search = Article.includes(:volume, :authors).search(params[:q]) - @articles = @search.result.sort_by_volume_number_and_first_page.page(params[:page]).decorate + @articles = @search.result.sort_by_volume_number_and_first_page.decorate + # .page(params[:page]).decorate respond_to do |format| format.html diff --git a/app/views/articles/_article_list.html.haml b/app/views/articles/_article_list.html.haml index 9344ead..684806b 100644 --- a/app/views/articles/_article_list.html.haml +++ b/app/views/articles/_article_list.html.haml @@ -13,4 +13,4 @@ %td= article.title %td{ class: [:nowrap, :center] } = article.pages - %tfoot= paginate @articles, remote: true + / %tfoot= paginate @articles, remote: true diff --git a/spec/features/articles_spec.rb b/spec/features/articles_spec.rb index c8b5118..e00d7df 100644 --- a/spec/features/articles_spec.rb +++ b/spec/features/articles_spec.rb @@ -8,17 +8,17 @@ expect(page).to have_css('table.articles tr', text: article.title) end - scenario 'articles are paginated' do - Article.paginates_per(1) - article1 = FactoryGirl.create(:article, pages: '1') - article2 = FactoryGirl.create(:article, pages: '2') - visit articles_path + # scenario 'articles are paginated' do + # Article.paginates_per(1) + # article1 = FactoryGirl.create(:article, pages: '1') + # article2 = FactoryGirl.create(:article, pages: '2') + # visit articles_path - expect(page).to have_content(article1.title) - expect(page).to have_no_content(article2.title) + # expect(page).to have_content(article1.title) + # expect(page).to have_no_content(article2.title) - click_on 'Next' + # click_on 'Next' - expect(page).to have_content(article2.title) - end + # expect(page).to have_content(article2.title) + # end end