title: Undefined method 'map' for nil:NilClass
body: <p>My app seems to randomly be throwing a "undefined method `map' for nil:NilClass" error when users are trying to update their profile.</p>
  
  <p>But what's weird is it's saying the error happens on update, but the error line is actually in a view. </p>
  
  <p>Full error:</p>
  
  <pre><code>users#update (ActionView::TemplateError) "undefined method `map' for nil:NilClass"
  
  On line #52 of app/views/users/edit.html.erb
  
  Line 52: &lt;%= options_from_collection_for_select(@networks_domestic, 'id', 'name', @user.network_id) %&gt;
  </code></pre>
  
  <p>And here are the params from a recent error:</p>
  
  <pre><code>{"user"=&gt;{"email_notify"=&gt;"email@example.com", "network_id"=&gt;"", 
  "password_confirmation"=&gt;"[FILTERED]", "mobile"=&gt;"", "password"=&gt;"[FILTERED]", 
  "email"=&gt;"email@example.com"}, "action"=&gt;"update", "_method"=&gt;"put", "id"=&gt;"5089", 
  "controller"=&gt;"users"}
  </code></pre>
  
  <p>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.</p>