Module: HasVcards::ApplicationHelper

Defined in:
app/helpers/has_vcards/application_helper.rb

Overview

View helpers

These helpers are available by default.

Instance Method Summary collapse

Instance Method Details

#address(vcard, line_separator = '<br/>') ⇒ Object



6
7
8
# File 'app/helpers/has_vcards/application_helper.rb', line 6

def address(vcard, line_separator = '<br/>')
  vcard.address_lines.map { |line| h(line) }.join(line_separator).html_safe
end

#contact(vcard, line_separator = '<br/>', label_separator = ' ') ⇒ Object



14
15
16
# File 'app/helpers/has_vcards/application_helper.rb', line 14

def contact(vcard, line_separator = '<br/>', label_separator = ' ')
  vcard.contact_lines(label_separator).map { |line| h(line) }.join(line_separator).html_safe
end

#full_address(vcard, line_separator = '<br/>') ⇒ Object



10
11
12
# File 'app/helpers/has_vcards/application_helper.rb', line 10

def full_address(vcard, line_separator = '<br/>')
  vcard.full_address_lines.map { |line| h(line) }.join(line_separator).html_safe
end