app/controllers/application_controller.rb
# If the current user has no allocations AND they have not disabled this preference, then a 
# flash message will display on every page load instructing them to set up their allocations.
If the current user has no allocations AND they have not disabled this preference, then a
flash message will display on every page load instructing them to set up their allocations.
If the current user has no allocations AND they have not disabled this preference then a flash message will display on every page load instructing them to set up their allocations .
def remind_user_to_set_allocations
      if !@current_user.blank? && @current_user.new_user_reminder &&
            @current_user.get_total_service_allocation(@current_fiscal_year,
            @allocation_precision).zero?
        edit_employee_link = "<a href = \"" + edit_employee_path(@current_user.id) + 
                             "\">" + t(:here) + "</a>"
        user_settings_link = "<a href = \"" + user_settings_employee_path(@current_user.id) + 
                             "\">" + t(:user_settings) + " </a>"
        flash[:message] = (t(:new_user_message_0) + edit_employee_link + 
                          t(:new_user_message_1) + user_settings_link).html_safe
      end
    end
def remind_user_to_set_allocations if ! @current_user . blank? && @current_user . new_user_reminder && @current_user . get_total_service_allocation ( @current_fiscal_year , @allocation_precision ) . zero? edit_employee_link = "<a href = \"" + edit_employee_path ( @current_user . id ) + "\">" + t ( :here ) + "</a>" user_settings_link = "<a href = \"" + user_settings_employee_path ( @current_user . id ) + "\">" + t ( :user_settings ) + " </a>" flash [ :message ] = ( t ( :new_user_message_0 ) + edit_employee_link + t ( :new_user_message_1 ) + user_settings_link ) . html_safe end end
If the current user has no allocations AND they have not disabled this preference, then a
flash message will display on every page load instructing them to set up their allocations.
If the current user has no allocations AND they have not disabled this preference then a flash message will display on every page load instructing them to set up their allocations .