Ask A Question

Notifications

You’re not receiving notifications from this thread.

Can you make an episode on Recurring Events- recurring_select + ice_cube

Olsi Gjeci asked in Site Feedback

Can you make an episode on this! I've gotten to the point of adding recurrence rules, but having trouble generating and showing events that are recurring on future dates the same way they appear regularly on a page when you create and kind of events!
Thank you Chris. I asked you before about this and you said you will do it. Hopefully, you find some time soon! thanks a lot. keep up the good work!

Reply

Yes! This has been on my todo list for far too long. I will most likely be using the https://github.com/rossta/montrose gem for this because it helps generate those future dates and things really nicely. This doesn't really have anything related to saving these objects to the database, so I think that would be hugely valuable along with some simple_calendar support. :D

Reply

I'm going to put it on my recording schedule to record this week.

Reply

Nice! thanks Chris. It would be really great if you can approximate something like what google calendar does with recurring events! that would be awesome. i really cant find the best way to record all the recurring events and display them in many pages taking in consideration that user might update/delete all or one of those recurring events and keep the others for example or even having a maximum number of those that can be created for each object! etc etc, but a bit complex for me ! also using you simple_calendar or and yes it would be awesome to integrate recurring events with it. thank you! looking forward to these episodes man! following all your tutorials and learning a lot! from them!

Reply

Actually ice_cube has yaml, hash, and ical exports so that probably makes it a better solution at the moment over Montrose for this purpose. I'll probably try to cover both and not the differences between them.

Ah yes, that's one of those special cases that can be hard to solve. I'll try to cover that use case in the episode or a follow up if I can. I think what you'd want to do in that case is to save that date like a non-recurring event and then add an exception to the recurring events for to skip that date. Kind of confusing, but should do the trick assuming they can handle that.

Looking forward to covering this finally. I should have done this months ago. ;)

Reply

Yes. Ice_cube and recurring_select are nice especially used together. yep that part is confusing for me. but im doing something like described here:
http://stackoverflow.com/questions/17054670/ice-cube-and-recurring-select-gems-and-occurrences?rq=1
and still having some problems with to_h and to_hash...when i have users create dance class without recurrence(bc it's optional) it gives me error and says chnage to to_h- i do and it works - it saves with recurrence rule.... but when i do try to save with recurrence it says change to to_hash... and it works when i do! so weird.... also updating the event same thing!!! anyway, maybe bothering you too much, but just wanted to share just in case you happen to see same errors at some point!! thanks man..

oh i have another question about notifications(from your videos) and mailboxer messages- ive followed yout tut and able to now create notifications on all my controllers but the conversation and messages controllers not able to. cant really find the recipient in the case of mailboxer messages and conversations? also do i create both notifications for a new conversation and new message? i do want both! sorry im mixing other things in this thread.

THANK you so much again man!

Reply

I'm using the recurring_select + ice_cube gems on my app and implement the full_calendar for the interface. schedule. This is one of the best combination so far.

Reply

Hey Francisco can you share some ideas on how you have implemented these? having some problems with what i described above. thanks

Reply

I haven't tried without recurrent event. All my schedule have recurrent. I can add a gist with my setup and you can check it out.

Reply

I just implemented something like this in my site with ice cube where I track an excluded event if one is deleted or modified from the base. In the event that the change occurs to all then I expire the current repeatable event and create a new recurring event in its place. Looking forward to seeing your implementation. Thanks for all the great videos.

Reply

Hey Francisco yes that would help me a lot! thanks man. looking forward. it helps me a lot looking at different ways of doing it so looking at code is so nice! that's how ive been learning all about rails and playing myself of course but since im a proffesional dancer and had nothing to do before in my life with code, just looking at something and trying to make sense of it and learn form it has been very effective. thank you guys for this wonderful community. The rails community is always nice wherever you go! it just makes me learn more actually! hehe :) thanks guys

Reply
Reply

thank you Francisco. This helps a lot. My question is because I guess I don't fully understand all this, how do you exactly store the event the same way it is stored the first time- with all attributes like start date and image, etc etc... also you store it in the same table or create the recurrent table/model you were talking about? thanks, man and I hope this is not too many questions- I guess I don't fully understand.

Reply

The first Event with all the info is created on the Event model and when is the date of the even I use the build a recurrent is like a transaction of the event and is stored in the db. The Event just has a temp on the fly presenter. the recurrent es more like a record of what happen that day. That's my approach to this on my businesses logic.

Reply

Hey Chris are you gonna make this episode as you promised? Waiting for it! thank you

Reply

Yessir! I'm still working on it. Had a couple things come up and had to postpone the episode a little bit. Working on the screencast this afternoon. :)

Reply

I forgot to mention this, but I just posted this episode yesterday!

https://gorails.com/episodes/recurring-events?autoplay=1

Reply

As always Chris great job

Reply
Join the discussion
Create an account Log in

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

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

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