app/controllers/application_controller.rb
# TODO: I think we should prefer #check_authentication - remove this
I think we should prefer #check_authentication - remove this
I think we should prefer #check_authentication - remove this
def must_be_logged_in(exception = nil)
    flash[:warning] = I18n.t(:must_be_logged_in)
    flash[:warning] += " #{exception.message}" if exception && exception.message != exception.class.name
    session[:return_to] = request.url if params[:return_to].nil?
    redirect_to(login_path, return_to: params[:return_to])
  end
def must_be_logged_in ( exception = nil ) flash [ :warning ] = I18n . t ( :must_be_logged_in ) flash [ :warning ] += " #{exception.message}" if exception && exception . message != exception . class . name session [ :return_to ] = request . url if params [ :return_to ] . nil? redirect_to ( login_path , return_to : params [ :return_to ] ) end
TODO: I think we should prefer #check_authentication - remove this
TODO : I think we should prefer #check_authentication - remove this
# NOTE - by default an exception (with no message) reports its class name as the message. We don't want that:
exception
<not_specific>