Sha256: 8827fdabe8327a79cb8c30026af236619f1f7900d1cfd952cc771ca105393642
Contents?: true
Size: 480 Bytes
Versions: 1
Compression:
Stored size: 480 Bytes
Contents
module Papercat module PagesHelper include ActionView::Template::Handlers def render_page page body = page.body ERB.erb_implementation.new(page.body).result(binding).html_safe end def stylesheets content_tag :style do Stylesheet.all.inject('') { |m, s| m + s.body }.html_safe end end def scripts content_tag :script do Javascript.all.inject('') { |m, s| m + s.body }.html_safe end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
papercat-0.0.2 | app/helpers/papercat/pages_helper.rb |