Module: SimpleCalendar::CalendarHelper

Defined in:
app/helpers/simple_calendar/calendar_helper.rb

Instance Method Summary collapse

Instance Method Details

#calendar(options = {}, &block) ⇒ Object



3
4
5
6
# File 'app/helpers/simple_calendar/calendar_helper.rb', line 3

def calendar(options = {}, &block)
  raise "calendar requires a block" unless block
  render SimpleCalendar::Calendar.new(self, options), &block
end

#month_calendar(options = {}, &block) ⇒ Object



8
9
10
11
# File 'app/helpers/simple_calendar/calendar_helper.rb', line 8

def month_calendar(options = {}, &block)
  raise "month_calendar requires a block" unless block
  render SimpleCalendar::MonthCalendar.new(self, options), &block
end

#week_calendar(options = {}, &block) ⇒ Object



13
14
15
16
# File 'app/helpers/simple_calendar/calendar_helper.rb', line 13

def week_calendar(options = {}, &block)
  raise "week_calendar requires a block" unless block
  render SimpleCalendar::WeekCalendar.new(self, options), &block
end