Module: ProductExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/product_extensions.rb
Instance Method Summary collapse
-
#icecat_article_number ⇒ Object
FIXME! HAS 20140413 This is highly customer specific.
- #icecat_product_id ⇒ Object
- #icecat_vendor ⇒ Object
Instance Method Details
#icecat_article_number ⇒ Object
FIXME! HAS 20140413 This is highly customer specific
15 16 17 18 |
# File 'app/models/product_extensions.rb', line 15 def icecat_article_number self.number =~ /^HP-(.+)$/ $1 || self.number end |
#icecat_product_id ⇒ Object
25 26 27 |
# File 'app/models/product_extensions.rb', line 25 def icecat_product_id .first.icecat_product_id if .any? end |
#icecat_vendor ⇒ Object
20 21 22 23 |
# File 'app/models/product_extensions.rb', line 20 def icecat_vendor self.article_number =~ /^HP-(.+)$/ $1 ? "1" : nil end |