excid3 / simple_calendar

A wonderfully simple calendar gem for Rails
http://excid3.github.io/simple_calendar
MIT License
1.58k stars 268 forks source link

Allow to use `#date_range` public #205

Closed yensaki closed 6 years ago

yensaki commented 6 years ago

When we don't use view_context, but want to use SimpleCalendar, getting troubled that we cannot use #render and cannot access #date_range.

We want to use SimpleCalendar::Calendar followings,

calendar.date_range.each_slice(7) do |week|
  # do something ...
  week.each do |date|
    # do something ...
  end
end

This PR allow to access #date_range public.