Module: C80Yax::Items::ItemViewHelper

Defined in:
app/helpers/c80_yax/items/item_view_helper.rb

Instance Method Summary collapse

Instance Method Details

#item_print_full_desc(itm) ⇒ Object



15
16
17
18
19
20
# File 'app/helpers/c80_yax/items/item_view_helper.rb', line 15

def item_print_full_desc(itm)
  r = ''
  # noinspection RubyResolve
  r = itm.full_desc if itm.full_desc.present?
  r.html_safe
end

вывести первого попавшегося Производителя, назначенного Товару



6
7
8
9
10
11
12
13
# File 'app/helpers/c80_yax/items/item_view_helper.rb', line 6

def print_vendor(itm)
  str = '-'
  # noinspection RubyResolve
  if itm.vendors.count > 0
    str = itm.vendors.first.title
  end
  str
end