nerdhub/hcking

View on GitHub
app/controllers/calendars_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
#encoding: utf-8
class CalendarsController < ApplicationController
  before_action :require_region!, only: [ :show ]

  def index
  end

  def show
    start_date = params[:start].present? ? Date.parse(params[:start]) : Date.today

    @start_selector = StartSelector.new(start_date)
    @calendar       = Calendar.new(start_date, current_region, current_user)
  end
end