app/controllers/application_controller.rb
# Should be used only for non-GET HTTP requests. Otherwise use
# friendly_forwarding should be used.
Should be used only for non-GET HTTP requests. Otherwise use
friendly_forwarding should be used.
Should be used only for non - GET HTTP requests . Otherwise use friendly_forwarding should be used .
def redirect_if_not_logged_in
    return if logged_in?
    flash[:danger] = 'Access denied.'
    redirect_to root_path
  end
def redirect_if_not_logged_in return if logged_in? flash [ :danger ] = 'Access denied.' redirect_to root_path end
Should be used only for non-GET HTTP requests.
Should be used only for non - GET HTTP requests .