I have a multistep form where i save some values in the session model.
params[:event][:start] = DateTime.strptime(params[:event][:start], "%m/%d/%Y %l:%M %P") - offset.hours
session[:event_params].deep_merge!(params[:event]) if params[:event]
And I would like to access these variable later on, how should I do please? I tried session[:event_params][:start]
but it returns nil.
I ended using the following:
params[:event][:start] = session[:event_params].values[5] + offset.hours
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.