Exclude a controller from before_action

Use skip_before_action :authenticate in the relevant controller.

The format of this method is the same as before_action so if you want to skip calling :authenticate for a specific controller action, use:

skip_before_action :authenticate, only: [:show, :index]

The except: keyword can also be used.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)