Reputation: 8060
my root_path is basically redirecting to the most popular story at this instant.
my root is handled by pages#home action, which just redirects the user away to story_path(id).
when a user access an unauthorized page, I redirect that user to the root_url with the message "access denied." However, this doesn't work because at root the user is again redirected.
Any way to fix this?
Upvotes: 0
Views: 231
Reputation: 59
@Alok, Reading the doc from the link you post also provides:
redirect_to root_url, :notice => "You have successfully logged out"
Upvotes: 0
Reputation: 6519
If you are redirecting and want to persist the flash for an extra request, you could do that using
flash.keep
More info can be found from the Rails Guides.
Upvotes: 4