removes duplication between debate and proposal suggestions
This commit is contained in:
@@ -30,13 +30,8 @@ module CommentableActions
|
||||
end
|
||||
|
||||
def suggest
|
||||
@limit = 5
|
||||
@resources = @search_terms.present? ? resource_model.search(@search_terms) : nil
|
||||
set_resources_instance
|
||||
if @resources
|
||||
@resources_count = @resources.count
|
||||
@reg_show = 5
|
||||
render layout: false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
@@ -15,6 +15,7 @@ class DebatesController < ApplicationController
|
||||
has_orders %w{most_voted newest oldest}, only: :show
|
||||
|
||||
load_and_authorize_resource
|
||||
helper_method :resource_model, :resource_name
|
||||
respond_to :html, :js
|
||||
|
||||
def vote
|
||||
|
||||
@@ -14,6 +14,7 @@ class ProposalsController < ApplicationController
|
||||
has_orders %w{most_voted newest oldest}, only: :show
|
||||
|
||||
load_and_authorize_resource
|
||||
helper_method :resource_model, :resource_name
|
||||
respond_to :html, :js
|
||||
|
||||
def index_customization
|
||||
|
||||
Reference in New Issue
Block a user