Sha256: 7e61ce06888f3c19d29db4e909705a21e33097188724d811887b88a475560f57
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
# encoding: UTF-8 module Spontaneous::Model::Core module Render extend Spontaneous::Concern def output(format = :html) return page.output(format, self) if page raise "Cannot render content without enclosing page" end def render(format = :html, params = {}, parent_context = nil) params, format = format, :html if format.is_a?(Hash) output(format).render(params, parent_context) end def render_using(renderer, format = :html, params = {}, parent_context = nil) output(format).render_using(renderer, params, parent_context) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spontaneous-0.2.0.beta5 | lib/spontaneous/model/core/render.rb |