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