title: Rails 3.2.13 / Devise 2.2.3: Method "authenticate_scope!" throws error: wrong number of arguments (1 for 0)
body: <p>I use Devise (2.2.3) and am trying to load the "edit" form for a user using this jQuery ajax call:</p>
  
  <pre><code>$.ajax({
    type: 'GET',
    url: '/users/edit',
    data: {
      id: id
    }
  });
  </code></pre>
  
  <p>This will call this before_filter...</p>
  
  <pre><code>prepend_before_filter :authenticate_scope!, :only =&gt; [:edit, :update, :destroy]
  </code></pre>
  
  <p>...from the gem file...</p>
  
  <pre><code>devise/app/controllers/devise/registrations_controller.rb
  
  (see: https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb)
  </code></pre>
  
  <p>The method that's eventually called is:</p>
  
  <pre><code># Authenticates the current scope and gets the current resource from the session.
  def authenticate_scope!
    send(:"authenticate_#{resource_name}!"), :force =&gt; true)
    self.resource = send(:"current_#{resource_name}")
  end
  </code></pre>
  
  <p>And the error I get is:</p>
  
  <pre><code>ArgumentError at /users/edit
  ============================
  
  &gt; wrong number of arguments (1 for 0)
  
  (gem) devise-2.2.3/app/controllers/devise/registrations_controller.rb, line 116
  -------------------------------------------------------------------------------
  
  ``` ruby
    111       signed_in_root_path(resource)
    112     end
    113   
    114     # Authenticates the current scope and gets the current resource from the session.
    115     def authenticate_scope!
  &gt; 116       send(:"authenticate_#{resource_name}!", :force =&gt; true)
    117       self.resource = send(:"current_#{resource_name}")
    118     end
    119   end
  ```
  </code></pre>
  
  <p>But when I delete the ":force => true", then the error vanishes:</p>
  
  <pre><code># Authenticates the current scope and gets the current resource from the session.
  def authenticate_scope!
    send(:"authenticate_#{resource_name}!"))  # deleted: :force =&gt; true
    self.resource = send(:"current_#{resource_name}")
  end
  </code></pre>
  
  <p>So I'm wondering what the ":force => true" means... Why do I get the error when I leave it in place?
  I suppose it's a bad idea to monkey-patch gem code like this. But what else can I do to avoid the error?</p>
  
  <p>Thanks for your help!</p>