Module: Arbre::Rails::Rendering

Included in:
Element
Defined in:
lib/arbre/rails/rendering.rb

Instance Method Summary collapse

Instance Method Details

#render(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/arbre/rails/rendering.rb', line 6

def render(*args)
  rendered = helpers.render(*args)
  case rendered
  when Arbre::Context
    current_arbre_element.add_child rendered
  else
    text_node rendered
  end
end