includes search concern in commendable actions

This commit is contained in:
rgarcia
2017-05-04 20:42:21 +02:00
parent 37d8693049
commit 87dd15b7bf
3 changed files with 1 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
module CommentableActions
extend ActiveSupport::Concern
include Polymorphic
include Search
def index
@resources = @search_terms.present? ? resource_model.search(@search_terms) : resource_model.all

View File

@@ -2,7 +2,6 @@ class DebatesController < ApplicationController
include FeatureFlags
include CommentableActions
include FlagActions
include Search
before_action :parse_tag_filter, only: :index
before_action :authenticate_user!, except: [:index, :show, :map]

View File

@@ -1,7 +1,6 @@
class ProposalsController < ApplicationController
include CommentableActions
include FlagActions
include Search
before_action :parse_tag_filter, only: :index
before_action :load_categories, only: [:index, :new, :edit, :map, :summary]