Class: Xrono::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
RefurlHelper
Defined in:
app/controllers/xrono/application_controller.rb

Direct Known Subclasses

Dashboard::BaseController

Instance Method Summary collapse

Methods included from RefurlHelper

#redirect_to_ref_url

Instance Method Details

#get_calendar_detailsObject



13
14
15
16
17
18
19
# File 'app/controllers/xrono/application_controller.rb', line 13

def get_calendar_details
  if params[:date].present? && params[:date] != "null"
    @start_date = Date.parse(params[:date]).beginning_of_week
  else
    @start_date = Date.current.beginning_of_week
  end
end