From 1fc9075c3b76dcc5030d55ac18b60456182fb0c0 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Fri, 11 Jun 2021 16:51:40 +0200 Subject: [PATCH] suite --- app/controllers/forum/forum_topics_controller.rb | 5 +---- app/views/forum/forum_topics/index.haml | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/controllers/forum/forum_topics_controller.rb b/app/controllers/forum/forum_topics_controller.rb index 1450f27..25459c3 100644 --- a/app/controllers/forum/forum_topics_controller.rb +++ b/app/controllers/forum/forum_topics_controller.rb @@ -24,10 +24,7 @@ class Forum::ForumTopicsController < ApplicationController def index @forum_topics = ForumTopic.where(:enabled => true) - - per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 50 - page = (params[:page] and params[:page] != "") ? params[:page] : 1 - @forum_topics = @forum_topics.page(page).per(per_page) + end diff --git a/app/views/forum/forum_topics/index.haml b/app/views/forum/forum_topics/index.haml index 8da45ed..96b2aa5 100644 --- a/app/views/forum/forum_topics/index.haml +++ b/app/views/forum/forum_topics/index.haml @@ -14,8 +14,6 @@ =render @forum_topics -#pagination - = paginate @forum_topics =link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right" \ No newline at end of file