Class: Spree::SizeType

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/spree/size_type.rb

Instance Method Summary collapse

Instance Method Details

#name_with_unit(unit) ⇒ Object



3
4
5
6
7
8
9
# File 'app/models/spree/size_type.rb', line 3

def name_with_unit(unit)
  if unit and !unit.blank?
    "#{name} (#{unit})"
  else
    name
  end
end