app/helpers/projects_helper.rb
# Given tiered percentage as integer value, return its string representation
# Returns nil if given blank value.
# rubocop:disable Metrics/MethodLength
Given tiered percentage as integer value, return its string representation
Returns nil if given blank value.
Given tiered percentage as integer value return its string representation Returns nil if given blank value .
def tiered_percent_as_string(value)
    return if value.blank?
    partial = value % 100
    if value < 100
      I18n.t 'projects.index.in_progress_next', percent: partial
    elsif value < 200
      I18n.t 'projects.index.passing_next', percent: partial
    elsif value < 300
      I18n.t 'projects.index.silver_next', percent: partial
    elsif value >= 300
      I18n.t 'projects.form_early.level.2'
    end
  end
def tiered_percent_as_string ( value ) return if value . blank? partial = value % 100 if value < 100 I18n . t 'projects.index.in_progress_next' , percent : partial elsif value < 200 I18n . t 'projects.index.passing_next' , percent : partial elsif value < 300 I18n . t 'projects.index.silver_next' , percent : partial elsif value >= 300 I18n . t 'projects.form_early.level.2' end end
Given tiered percentage as integer value, return its string representation
Returns nil if given blank value.
Given tiered percentage as integer value return its string representation Returns nil if given blank value .
value
<not_specific>