title: Update User Outside `users#edit` Page
body: <p>I am trying to create a simple button that updates the boolean <code>user</code> attribute <code>notify_generator</code> from its default value of <code>false</code> to <code>true</code> when the user submits a form.  The form is on my <code>home#construction</code> page:</p>
  
  <pre><code>  &lt;% if current_user.notify_generator == false %&gt;
      &lt;h1 class=""&gt;Want to know when it's ready?&lt;/h1&gt;
      &lt;%= form_for(@user) do |f| %&gt;  &lt;&lt;&lt;&lt;&lt;&lt;ERROR CALLED ON THIS LINE
        &lt;%= f.hidden_field :notify_generator, value: true %&gt;
        &lt;%= f.submit "Keep Me In The Loop", class: "btn btn-primary" %&gt;
      &lt;% end %&gt;
    &lt;% else %&gt;
      &lt;h1&gt;You're set! We'll let you know when the generator is up and running!&lt;/h1&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>The <code>home_controller</code> is as follows:</p>
  
  <pre><code>class HomeController &lt; ApplicationController
    before_action :historical_only
    skip_before_action :historical_only, except: [:history]
    before_action :authenticate_user!, only: [:construction, :generator]
  
    def index
    end
  
    def history
    end
  
    def about
    end
  
    def gear
    end
  
    def generator
    end
  
    def construction
      @user = current_user
    end
  
    private
    def historical_only
      unless current_user &amp;&amp; ( current_user.access_historical == true || current_user.admin == true )
        flash[:error] = "You must be a historical BurnIt member to see those goodies."
        render action: "index"
      end
    end
  end
  </code></pre>
  
  <p>Right now, when I try to access the <code>home#construction</code> page I get <code>undefined method 'user_path' for #&lt;#&lt;Class:0x007fbc236054a0&gt;:0x007fbc24495470&gt;</code>.  I think this is symptomatic for trying to update a user from outside the domain of the registrations controller.  I'm using the <code>devise</code> gem, if that makes a difference.</p>
  
  <p>Can anyone see where I'm going wrong here?</p>
  
  <p><strong>ADDITIONAL INFORMATION:</strong></p>
  
  <pre><code>        new_user_session GET    /users/sign_in(.:format)                           devise/sessions#new
              user_session POST   /users/sign_in(.:format)                           devise/sessions#create
      destroy_user_session DELETE /users/sign_out(.:format)                          devise/sessions#destroy
             user_password POST   /users/password(.:format)                          devise/passwords#create
         new_user_password GET    /users/password/new(.:format)                      devise/passwords#new
        edit_user_password GET    /users/password/edit(.:format)                     devise/passwords#edit
                           PATCH  /users/password(.:format)                          devise/passwords#update
                           PUT    /users/password(.:format)                          devise/passwords#update
  cancel_user_registration GET    /users/cancel(.:format)                            registrations#cancel
         user_registration POST   /users(.:format)                                   registrations#create
     new_user_registration GET    /users/sign_up(.:format)                           registrations#new
    edit_user_registration GET    /users/edit(.:format)                              registrations#edit
                           PATCH  /users(.:format)                                   registrations#update
                           PUT    /users(.:format)                                   registrations#update
                           DELETE /users(.:format)                                   registrations#destroy
  </code></pre>