Class: Admin::CalendarsController

Inherits:
AdminController
  • Object
show all
Defined in:
app/controllers/admin/calendars_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/admin/calendars_controller.rb', line 9

def show
  unless @year
    redirect_to(admin_calendar_path(content_locale, Time.zone.now.year))
    return
  end
  @pages = if @month
             calendar_items.in_year_and_month(@year, @month)
           else
             calendar_items.in_year(@year)
           end
end