Module: MeasuresHelper

Defined in:
app/helpers/measures_helper.rb

Overview

View helper for measurement and unit formatting.

Delegated Instance Attributes collapse

Instance Method Summary collapse

Instance Method Details

#inches_to_feetinchesObject

Alias for Unitconversions#inches_to_feetinches

Returns:

  • (Object)

    Unitconversions#inches_to_feetinches

See Also:



5
# File 'app/helpers/measures_helper.rb', line 5

delegate :inches_to_feetinches, to: :UnitConversions

#weight_with_pounds(weight) ⇒ String

Formats a weight value in pounds.

Parameters:

  • weight (Numeric)

    the weight value to format

Returns:

  • (String)

    the formatted weight with "lb" suffix



10
11
12
# File 'app/helpers/measures_helper.rb', line 10

def weight_with_pounds(weight)
  "#{weight.round(2)} lb"
end