Sha256: bbe3a3312ae0b8ddd13bc33e4710aa23fbf92228d614231d6c60dfe9b64bb743

Contents?: true

Size: 582 Bytes

Versions: 5

Compression:

Stored size: 582 Bytes

Contents

module HasVcards
  # View helpers
  #
  # These helpers are available by default.
  module ApplicationHelper
    def address(vcard, line_separator = '<br/>')
      vcard.address_lines.map { |line| h(line) }.join(line_separator).html_safe
    end

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
has_vcards-1.1.2 app/helpers/has_vcards/application_helper.rb
has_vcards-1.1.1 app/helpers/has_vcards/application_helper.rb
has_vcards-1.1.0 app/helpers/has_vcards/application_helper.rb
has_vcards-1.0.0 app/helpers/has_vcards/application_helper.rb
has_vcards-1.0.0.rc0 app/helpers/has_vcards/application_helper.rb