lib/authentication_needed_san.rb in Fingertips-authentication-needed-san-1.0.0 vs lib/authentication_needed_san.rb in Fingertips-authentication-needed-san-1.1.0

- old
+ new

@@ -58,9 +58,13 @@ # Finish the after_authentication flow, which means the user will be # redirected ‘back’ to the page she originally requested _before_ # authentication_needed! was called. def finish_authentication_needed! - flash.discard :after_authentication - redirect_to after_authentication[:redirect_to] + if authentication_needed? + flash.discard :after_authentication + redirect_to after_authentication[:redirect_to] + else + false + end end end \ No newline at end of file