Sha256: 38dda4bde0eb5d94820795a2cd79241c0478dde1c4a69427f0204d66001937c2

Contents?: true

Size: 428 Bytes

Versions: 3

Compression:

Stored size: 428 Bytes

Contents

require 'standalone_typograf'

module CommonHelper

  def copyright(start_year)
    current_year = Date.today.year
    if current_year > start_year
      "#{start_year} - #{current_year}".html_safe
    else
      "#{current_year}"
    end
  end

  def hide_style(style = nil)
    'display: none;' + style.to_s
  end

  def ty(text)
    ::StandaloneTypograf::Typograf.new(text, mode: :html).prepare.html_safe
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coalla-cms-0.7.0.0 app/helpers/common_helper.rb
coalla-cms-0.6.1.1 app/helpers/common_helper.rb
coalla-cms-0.6.0.9 app/helpers/common_helper.rb