In Devise, when you want to authenticate a user before they can access anything in your controller or application you must add this line to your controller:
redirect_to your_path, notice: "Please Login to view that page!" if request.original_fullpath != your_path
Related External Links: