Ask A Question

Notifications

You’re not receiving notifications from this thread.

Recurring events with the ice_cube gem Discussion

This is not a solution and the code is bad, but since the NPM package is outdated as well as the ruby gem, it at least "works" in Rails 7: https://github.com/robault/event_scheduling

Uses an updated version of the Ruby gem to Rails 7.0.4 and Ruby 3.2.2: https://github.com/robault/recurring_select

Reply

Hi Robert,
Thanks for posting your solution. I was able to make it work with Rails 7 too, but my set schedule dialog is ugly.

I wonder if you tried to use the 'until' and 'count' parameters in the recurring rules.
I can't find any documentation on that.
I see a pull request in the recurring_select GitHub repo: https://github.com/gregschmit/recurring_select/pull/117 (Add option to end after a number of occurrances or on a date #117) opened on the same issue.

After creating a recurring event the hash with the rule looks like this:

"recurring"=>"{\"interval\":1,\"until\":null,\"count\":null,\"validations\":{\"day\":[0]},\"rule_type\":\"IceCube::WeeklyRule\",\"week_start\":0}"

where 'until' and 'count' are null.
I would like to set up 'until' and 'count' values too.
Do you have any thoughts on that?
Thank you,
-Rita

Reply

Hi Chris.
This is an old episode and an old discussion. But it's still relevant, I watched it and used it in my Rails 7 project. But what I want to add to the Set Schedule dialog are the 'until' and 'count' parameters that are mentioned in the recurring rules. I can't find any documentation on that.

After creating a recurring event the hash with the rule looks like this:

"recurring"=>"{\"interval\":1,\"until\":null,\"count\":null,\"validations\":{\"day\":[0]},\"rule_type\":\"IceCube::WeeklyRule\",\"week_start\":0}"

where 'until' and 'count' are null. I would like to set up 'until' and 'count' values too.

I see a pull request in the recurring_select GitHub repo: https://github.com/gregschmit/recurring_select/pull/117 (Add option to end after a number of occurrances or on a date #117) opened on the same issue.

Do you have examples with all rules' parameters, or could you point me to any documentation?
Thank you,
-Rita

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.