Sha256: 2814664b1baab841ecae3a7445cef72e58f5e8f8c9e54102aac788272e7272e1

Contents?: true

Size: 259 Bytes

Versions: 3

Compression:

Stored size: 259 Bytes

Contents

module BrighterPlanetHelper
  def render_or_nothing(*args)
    begin
      render(*args)
    rescue ActionView::MissingTemplate
      nil
    end
  end
  
  def syntax(code, lang = 'ruby')
    ::Uv.parse(code, 'xhtml', lang, false, :idle).html_safe
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
brighter_planet_layout-0.2.4 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.3 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.2 app/helpers/brighter_planet_helper.rb