hacken-in/hacken-in

View on GitHub
app/controllers/api/calendars_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
#encoding: utf-8
class Api::CalendarsController < ApplicationController
  layout false

  def entries
    @calendar = Calendar.new(start_date, current_region, current_user)
  end

  def selector
    @start_selector = StartSelector.new(start_date)
  end

  private

  def start_date
    if params[:start].present?
      Date.parse(params[:start])
    else
      Date.today
    end
  end

end