You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm storing a user schedule in the User model (field: study_frequency).
I don't know how to display the next occurence.
I tried (naively): current_user.study_frequency.next_occurence(Time.now)
I also tried creating a IceCube object first: schedule = IceCube::Schedule.new(now = Time.now) do |s| s.add_recurrence_rule(current_user.study_frequency) end @user_schedule = schedule.next_occurrence(Time.now)
None of them worked. I'm sure I'm missing something obvious but can't figure out what.
Any advice?
Thanks!
Vincent
The text was updated successfully, but these errors were encountered:
Hi there,
I'm storing a user schedule in the User model (field: study_frequency).
I don't know how to display the next occurence.
I tried (naively):
current_user.study_frequency.next_occurence(Time.now)
I also tried creating a IceCube object first:
schedule = IceCube::Schedule.new(now = Time.now) do |s|
s.add_recurrence_rule(current_user.study_frequency)
end
@user_schedule = schedule.next_occurrence(Time.now)
None of them worked. I'm sure I'm missing something obvious but can't figure out what.
Any advice?
Thanks!
The text was updated successfully, but these errors were encountered: