Class: ImpeachmentController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/impeachment_controller.rb

Overview

Impeachment and candidates

Instance Method Summary collapse

Instance Method Details

#candidateObject

get /impeachment/candidates/:id



12
13
14
# File 'app/controllers/impeachment_controller.rb', line 12

def candidate
  @entity = Candidate.find(params[:id])
end

#candidatesObject

get /impeachment/candidates



6
7
8
9
# File 'app/controllers/impeachment_controller.rb', line 6

def candidates
  @filter = params[:filter] || {}
  @collection = Candidate.filtered(@filter).list_for_visitors.distinct.page(current_page)
end