You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
when i have a user that doesn't have a role, it has a Infinite loop and not redirecting to the login page
my rescue_from
rescue_from CanCan::AccessDenied do |exception|
if user_signed_in?
flash[:error] = "Not authorized to view this page"
session[:user_return_to] = nil
redirect_to root_url
else
flash[:error] = "You must first login to view this page"
session[:user_return_to] = request.url
redirect_to "/users/sign_in"
end
end
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:06 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:06 -0400
Processing by CustomersController#index as HTML
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.4ms)
The text was updated successfully, but these errors were encountered:
when i have a user that doesn't have a role, it has a Infinite loop and not redirecting to the login page
my rescue_from
The text was updated successfully, but these errors were encountered: