Sha256: da08805009a631f17d398e43a34c229fc384c1fc10ff2205cd09b8a672d5f5d3
Contents?: true
Size: 835 Bytes
Versions: 2
Compression:
Stored size: 835 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 Radiant Render and pumps out haml if necessary def is_haml? self[:content_type] == 'haml' end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-layouts-extension-1.1.3 | lib/haml_layouts/models/layout.rb |
radiant-layouts-extension-1.1.2 | lib/haml_layouts/models/layout.rb |