Class: Tasks::Projects::YearInReviewController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/projects/year_in_review_controller.rb

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#dataObject

GET /tasks/projects/year_in_review/data.json



13
14
15
16
# File 'app/controllers/tasks/projects/year_in_review_controller.rb', line 13

def data
  year = (params[:year] || Time.current.year).to_i
  render json: helpers.year_in_review_data(year, sessions_current_project_id)
end

#indexObject

GET /tasks/projects/year_in_review



5
6
7
8
9
10
# File 'app/controllers/tasks/projects/year_in_review_controller.rb', line 5

def index
  @year = (params[:year] || Time.current.year).to_i
  @available_years = helpers.available_years_for_review(sessions_current_project_id)
  @form_url = year_in_review_task_path
  @data_url = year_in_review_data_path(format: :json)
end