Sha256: 8a27d13c2abddbe6d0d81a405991b0b0786fbc25105e41ec3c8f167a58e748e4

Contents?: true

Size: 280 Bytes

Versions: 11

Compression:

Stored size: 280 Bytes

Contents

module Dorsale
  module TextHelper
    def euros(n)
      number_to_currency(n)
    end

    def percentage(n)
      number_to_percentage(n, precision: 2, format: "%n %")
    end

    def text2html(str)
      h(str).gsub("\r", "").gsub("\n", "<br />").html_safe
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dorsale-1.2.5 app/helpers/dorsale/text_helper.rb
dorsale-1.2.4 app/helpers/dorsale/text_helper.rb
dorsale-1.2.3 app/helpers/dorsale/text_helper.rb
dorsale-1.2.2 app/helpers/dorsale/text_helper.rb
dorsale-1.2.1 app/helpers/dorsale/text_helper.rb
dorsale-1.2.0 app/helpers/dorsale/text_helper.rb
dorsale-1.1.4 app/helpers/dorsale/text_helper.rb
dorsale-1.1.3 app/helpers/dorsale/text_helper.rb
dorsale-1.1.2 app/helpers/dorsale/text_helper.rb
dorsale-1.1.1 app/helpers/dorsale/text_helper.rb
dorsale-1.1.0 app/helpers/dorsale/text_helper.rb