Sha256: da681346e39b7da1bd77aa9da885774f5889220993758a942db6d1e1cb1a7fff

Contents?: true

Size: 348 Bytes

Versions: 3

Compression:

Stored size: 348 Bytes

Contents

class <%= controller_class_name %> < ApplicationController
  
  def index
    @month = (params[:month] || (Time.zone || Time).now.month).to_i
    @year = (params[:year] || (Time.zone || Time).now.year).to_i

    @shown_month = Date.civil(@year, @month)

    @event_strips = <%= model_class_name %>.event_strips_for_month(@shown_month)
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
event-calendar-2.3.3 lib/generators/event_calendar/templates/controller.rb.erb
event-calendar-2.3.2 lib/generators/event_calendar/templates/controller.rb.erb
event-calendar-2.3.1 lib/generators/event_calendar/templates/controller.rb.erb