I'm using recurring_select and ice_cube to let the user define recurring events. I'm storing the serialized IceCube-Schedule in a string-Attribute.
The event-Model includes this code:
include IceCube
serialize :schedule, IceCube::Schedule
The Controller is sanitizing the Input:
params[:event][:schedule] = JSON.parse(params[:event][:schedule], quirks_mode: true)
The view looks like this:
= simple_form_for [:admin, @event] do |f|
= f.input :schedule do
= f.select_recurring :schedule
This is what the params look after sanitizing for an Event recurring each day:
{"schedule"=>{"interval"=>1, "until"=>nil, "count"=>nil, "validations"=>nil, "rule_type"=>"IceCube::DailyRule"}}
But after assigning this to a new event using Event.new, inspecting the schedule looks like this:
#<IceCube::Schedule:0x007f762831e958 @start_time=2015-12-17 12:02:29 +0100, @all_recurrence_rules=[], @all_exception_rules=[]>
The recurring rules seem to be gone and the form-field only displays the date and time.