Module: C80Yax::Items::Shared::ItemViewHelper

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

Instance Method Summary collapse

Instance Method Details

#item_print_full_desc(itm) ⇒ Object



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

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

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



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

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