Module: Smartgen::Engine::ActionViewProcessor
- Included in:
- ActionView, ActionViewPreProcessor
- Defined in:
- lib/smartgen_action_view/action_view_processor.rb
Defined Under Namespace
Modules: DefaultHelpers
Instance Attribute Summary collapse
-
#tempfile ⇒ Object
Returns the value of attribute tempfile.
Instance Method Summary collapse
Instance Attribute Details
#tempfile ⇒ Object
Returns the value of attribute tempfile.
4 5 6 |
# File 'lib/smartgen_action_view/action_view_processor.rb', line 4 def tempfile @tempfile end |
Instance Method Details
#process_template(body, metadata) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/smartgen_action_view/action_view_processor.rb', line 10 def process_template(body, ) create_tempfile_with(body) view = ::ActionView::Base.new File.dirname(tempfile.path) view.extend(DefaultHelpers) view. = result = view.render :file => tempfile.path setup_content_for(view, ) result ensure tempfile.close! if tempfile end |