I know that with the following code:
before_action :signed_in?, only: [:new]
the action new will be executed if the signed_in
new
signed_in
If you want to cover all other methods withbefore_action :signed_in?except new action, you'b better to use :except instead of :only like this:before_action :signed_in?, except: :new
before_action :signed_in?
:except
:only
before_action :signed_in?, except: :new