You can clone with
HTTPS or Subversion.
Hi, I like the simplistic aspect of the gem. Even though you very clearly say for rails 3.2, thought I'd try it for my 3.0.13 app... not too surprisingly it won;t get to first base...
wrong number of arguments (1 for 0)
Extracted source (around line #1):
1: <%= calendar @my_schedules do |event| %>
Just wondering if you have any hints where I might go about modifying this to work with Rail 3.0? Not sure if it's 3.2 through-and-through, or if there might be just 1 or 2 little tweaks required?
Regardless, great work on coming up with a simple solution instead of the every-tool-in-the-kitchen approach of most gems.
So I think the main compatibility thing you're going to find was that in Rails 3.2 they added some functionality to handle changing the first day of the week in a couple methods. I think that's where this is going wrong.
If you post the full application stack trace that should have a line or two that is in the gem where it was executing. We can use that to trace things back.
I found a similar approach in the Railscast 213, encountered the same error message, fixed it by simply removing the start day in first = date.beginning_of_month.beginning_of_week(START_DAY) - which made it start on Monday instead of being able to select it.
So it might be the same for your gem?
Yeah I think that's exactly the problem. I'm thinking that only these two places need to change:
If you want, clone this locally, remove those start_day pieces, add it to your Gemfile with the path option and see if it works for you. If it does, we've got two options for patching this for < 3.2:
Did you get a chance to take a look at this yet?
I did not try re-incorporating gem since I was under a tight deadline and wasn't actually sure how to edit the gem source then re-incorporate it. (I ended up copying the railscast code and using that instead for my older app)
No worries! I'm thinking with Rails 4 around the corner and there being enough decent solutions for older versions of Rails <= 3.1 I'll probably close this unless there's a need for it you might still have.
I concur - not much need to chase the old-old versions!
Cool, thanks for the feedback.