Sha256: b81d3c10aa47fd4df1fca2d8d6398d99620c1f42a30634d9a38807b34c29a72c

Contents?: true

Size: 269 Bytes

Versions: 9

Compression:

Stored size: 269 Bytes

Contents

require 'uv'
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

9 entries across 9 versions & 1 rubygems

Version Path
brighter_planet_layout-0.2.13 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.12 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.11 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.10 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.9 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.8 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.7 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.6 app/helpers/brighter_planet_helper.rb
brighter_planet_layout-0.2.5 app/helpers/brighter_planet_helper.rb