Class: Decidim::Problems::ProblemsController

Inherits:
ApplicationController show all
Includes:
ApplicationHelper, OrderableProblems, WithDefaultFilters, WithSdgs, FilterResource, Paginable
Defined in:
app/controllers/decidim/problems/problems_controller.rb

Overview

Controller that allows browsing problems.

Instance Method Summary collapse

Instance Method Details

#indexObject



24
25
26
27
28
# File 'app/controllers/decidim/problems/problems_controller.rb', line 24

def index
  @problems = search.result
  @problems = reorder(@problems)
  @problems = paginate(@problems)
end

#showObject



30
31
32
33
# File 'app/controllers/decidim/problems/problems_controller.rb', line 30

def show
  @problem = Decidim::Problems::Problem.find(params[:id])
  @challenge_scope = challenge_scope
end