My app seems to randomly be throwing a "undefined method `map' for nil:NilClass" error when users are trying to update their profile.
But what's weird is it's saying the error happens on update, but the error line is actually in a view.
Full error:
users#update (ActionView::TemplateError) "undefined method `map' for nil:NilClass"
On line #52 of app/views/users/edit.html.erb
Line 52: <%= options_from_collection_for_select(@networks_domestic, 'id', 'name', @user.network_id) %>
And here are the params from a recent error:
{"user"=>{"email_notify"=>"[email protected]", "network_id"=>"",
"password_confirmation"=>"[FILTERED]", "mobile"=>"", "password"=>"[FILTERED]",
"email"=>"[email protected]"}, "action"=>"update", "_method"=>"put", "id"=>"5089",
"controller"=>"users"}
Honestly not sure where to even start looking. I've had a user say he can update the same info from IE but not from Firefox. And when I use their same info I'm able to update without issue. So, I'm stumped.