Module: Grass::Helpers::RenderHelper
- Included in:
- Render::Renderer
- Defined in:
- lib/grass/helpers/render_helper.rb
Instance Method Summary collapse
Instance Method Details
#include_partial(key) ⇒ Object
8 9 10 11 |
# File 'lib/grass/helpers/render_helper.rb', line 8 def include_partial key source = Source[key].first || init_source_if_file_exists(key) source.try(:raw) end |
#render_content ⇒ Object
19 20 21 |
# File 'lib/grass/helpers/render_helper.rb', line 19 def render_content @data[:source].try(:render,@data) end |
#render_partial(key, data = nil) ⇒ Object
13 14 15 16 17 |
# File 'lib/grass/helpers/render_helper.rb', line 13 def render_partial key, data = nil data ||= @data source = Source[key].first || init_source_if_file_exists(key) source.try(:render,data) end |