module C80Push module AdminHelper # noinspection RubyResolve def first_region(subj) res = '-' unless subj.regions.count.zero? res = subj.regions.first.title end res.html_safe end # noinspection RubyResolve def ul_offices(subj) res = '-' unless subj.offices.count.zero? res = '' subj.offices.def_order.each do |office| e = "
  • #{office.title}
  • " res += e end res = "".html_safe end res end # noinspection RubyResolve def ul_dealers(subj) res = '-' unless subj.dealers.count.zero? res = '' subj.dealers.def_order.each do |dealer| e = "
  • #{dealer.title}
  • " res += e end res = "".html_safe end res end def dealer_col_title(dealer) res = "#{dealer.title}" res += "
    email: #{format_val(dealer.email)}" res += "
    site: #{format_val(dealer.site)}" res.html_safe end private def format_val(val) res = '-' unless val.blank? res = val end "#{res}".html_safe end end end