Module: AtomicAssets::Render
- Included in:
- Component
- Defined in:
- lib/atomic_assets/render.rb
Constant Summary collapse
- COMPONENT_PATH =
'components'
- PARTIALS_DEPRECATED =
'Using view partial component templates will be removed in atomic_assets-0.1.0. Please remove leading underscores from your template file names.'
Instance Method Summary collapse
Instance Method Details
#render ⇒ Object
6 7 8 9 10 11 |
# File 'lib/atomic_assets/render.rb', line 6 def render render_template rescue ActionView::MissingTemplate => error raise error unless error.path == component_name render_partial end |
#template_path ⇒ Object
13 14 15 |
# File 'lib/atomic_assets/render.rb', line 13 def template_path File.join(COMPONENT_PATH, component_name) end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/atomic_assets/render.rb', line 17 def to_s render end |