Allow one or multiple methods to the :day_methods option. #13

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@marclipovsky

This is great if you start and end dates on your object. I feel like this is a wanted feature out there.

You can do either:

<%= t.day(:day_method => :calendar_date) do |day, tasks| %>

Or you can pass an array:

<%= t.day(:day_method => [:start_date, :end_date]) do |day, tasks| %>

I figured rather than forcing people to switch to an array (even if they had one method on the :day_method), they can update this gem without having to change their code.

Thanks!

@marclipovsky marclipovsky commented on the diff Aug 28, 2012
README.md
@@ -17,7 +17,7 @@ Add this to your Gemfile:
or if you prefer to use it straight from GitHub:
- gem "watu_table_builder", :require => "table_builder", :git => "git://github.com/watu/table_builder.git"
+ gem "watu_table_builder", :require => "table_builder", :git => "git://github.com/marclipovsky/table_builder.git"
@marclipovsky
marclipovsky Aug 28, 2012

Sorry you can leave out this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment