Sha256: e8ff22e0cf1446a070cd480c12a704749dc4d1124be0ebf3a9cb910ffffb91c1
Contents?: true
Size: 491 Bytes
Versions: 9
Compression:
Stored size: 491 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 def link_to_homesite(text, path = '') path.insert 0, 'http://brighterplanet.com/' unless ::BrighterPlanetLayout.application_name == 'Brighter Planet' path << '/' if path.empty? link_to text, path end end
Version data entries
9 entries across 9 versions & 1 rubygems