title: DoubleRenderError in restful_authentication with acts_as_state_machine when activating users
body: <p>In a project which uses <code>restful_authentication</code> with <code>acts_as_state_machine</code> and email activation, I get a double render error whenever a user does the activation action from the email link.</p>
  
  <p>I'm using the default</p>
  
  <pre><code>def activate
     self.current_user = params[:activation_code].blank? ? false : User.find_by_activation_code(params[:activation_code])
     if logged_in? &amp;&amp; !current_user.active?
     current_user.activate!
     flash[:notice] = "Signup complete!"
     end
     redirect_back_or_default('/')
  end
  </code></pre>
  
  <p>to activate, and the default</p>
  
  <pre><code>def redirect_back_or_default(default)
    redirect_to(session[:return_to] || default)
    session[:return_to] = nil
  end
  </code></pre>
  
  <p>to redirect. The redirect method works in every other case it's called in the same way.</p>
  
  <p>The double render error occurs at the render of the page main_page/home that is routed as "/".</p>
  
  <p>What should I be looking for?</p>