I am having trouble using the params.require().permit()
method because it is not considering one of the attributes I'm setting to it, namely the attribute :on
What I have is this:
def event_recurrence_params
params.require(:event_recurrence).permit(:room_id, [...], :on, :every)
end
Then, when I call event_recurrence_params
, the answer is
>> event_recurrence_params
=> {"room_id"=>"1", [...], "every"=>"week"}
even though the value of params[:event_recurrence]
is
>> params[:event_recurrence]
=> {"room_id"=>"1", [...], "on"=>["wednesday"], "every"=>"week"}
As you can see, the :on
attribute is not being considered in the event_recurrence_params
even though the attribute is permitted and the params[:event_recurrence]
include it.
Any ideas? I've tried lots of things but none of it worked. Thank you!