includes search concern in commendable actions
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
module CommentableActions
|
module CommentableActions
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
include Polymorphic
|
include Polymorphic
|
||||||
|
include Search
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@resources = @search_terms.present? ? resource_model.search(@search_terms) : resource_model.all
|
@resources = @search_terms.present? ? resource_model.search(@search_terms) : resource_model.all
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ class DebatesController < ApplicationController
|
|||||||
include FeatureFlags
|
include FeatureFlags
|
||||||
include CommentableActions
|
include CommentableActions
|
||||||
include FlagActions
|
include FlagActions
|
||||||
include Search
|
|
||||||
|
|
||||||
before_action :parse_tag_filter, only: :index
|
before_action :parse_tag_filter, only: :index
|
||||||
before_action :authenticate_user!, except: [:index, :show, :map]
|
before_action :authenticate_user!, except: [:index, :show, :map]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
class ProposalsController < ApplicationController
|
class ProposalsController < ApplicationController
|
||||||
include CommentableActions
|
include CommentableActions
|
||||||
include FlagActions
|
include FlagActions
|
||||||
include Search
|
|
||||||
|
|
||||||
before_action :parse_tag_filter, only: :index
|
before_action :parse_tag_filter, only: :index
|
||||||
before_action :load_categories, only: [:index, :new, :edit, :map, :summary]
|
before_action :load_categories, only: [:index, :new, :edit, :map, :summary]
|
||||||
|
|||||||
Reference in New Issue
Block a user