displays the top 3 proposals for every category
This commit is contained in:
@@ -8,7 +8,7 @@ class ProposalsController < ApplicationController
|
||||
before_action :set_search_order, only: :index
|
||||
before_action :load_categories, only: [:index, :new, :edit, :map]
|
||||
before_action :load_geozones, only: [:edit, :map]
|
||||
before_action :authenticate_user!, except: [:index, :show, :map]
|
||||
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
|
||||
|
||||
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
|
||||
has_orders %w{most_voted newest oldest}, only: :show
|
||||
@@ -35,6 +35,10 @@ class ProposalsController < ApplicationController
|
||||
set_featured_proposal_votes(@proposal)
|
||||
end
|
||||
|
||||
def summary
|
||||
@proposals = Proposal.grouped_by_categories(Proposal.category_names)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def proposal_params
|
||||
|
||||
Reference in New Issue
Block a user