lib/janus/controllers/sessions_controller.rb in janus-0.7.0 vs lib/janus/controllers/sessions_controller.rb in janus-0.8.0

- old
+ new

@@ -91,14 +91,15 @@ # super + [ my_peculiar_path, another_path ] # end # def never_return_to(scope) scope = Janus.scope_for(scope) - [ - new_session_path(scope), - new_password_path(scope), - edit_password_path(scope) - ] + list = [new_session_path(scope)] + begin + list + [ destroy_session_path(scope), new_password_path(scope), edit_password_path(scope) ] + rescue NoMethodError + list + end end # Either redirects the user to after_sign_in_url or to <tt>params[:return_to]</tt>. # # If <tt>params[:return_to] is an absolute URL, and not just a path,