I'm running integration tests to make sure my before_filter
is redirecting to root_path
if the user is not logged in. Everything seems to be working fine, but I'm seeing http://www.example.com/
in the Redirected to
message in log/test.log
, and I'm just wondering if this is normal, or if there's a configuration that I missed somewhere. Thanks!
log/test.log
Started PUT "/users/980190963" for 127.0.0.1 at 2012-07-29 13:31:39 -0700
Processing by UsersController#update as HTML
Parameters: {"user"=>{"password"=>"[FILTERED]"}, "id"=>"980190963"}
Redirected to http://www.example.com/
Filter chain halted as :reject_if_logged_out rendered or redirected
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
users_controller.rb
...
before_filter :reject_if_logged_out, only: [:update]
...
private
def reject_if_logged_out
redirect_to root_path unless @current_user
end