Sha256: d3d0fd0769163a022e36a5c3db581a6b363cd938a3519f43099dc03f28cef4e4
Contents?: true
Size: 838 Bytes
Versions: 154
Compression:
Stored size: 838 Bytes
Contents
module HamlLayouts module Models module Layout def self.included(base) base.class_eval do # Will render html from haml if necessary def rendered_content if is_haml? # The gsub will replace all escaped radius tags with html HamlFilter.filter(content) else content end end # Returns 'text/html' to the browser (if haml) def content_type self[:content_type] == 'haml' ? 'text/html' : self[:content_type] end # Overwrites the standard Trusty CMS Render and pumps out haml if necessary def is_haml? self[:content_type] == 'haml' end end end end end end
Version data entries
154 entries across 154 versions & 2 rubygems