Class: RenderTreeHelper::Render
- Inherits:
-
Object
- Object
- RenderTreeHelper::Render
- Defined in:
- app/helpers/render_tree_helper.rb
Class Attribute Summary collapse
-
.h ⇒ Object
Returns the value of attribute h.
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Class Attribute Details
.h ⇒ Object
Returns the value of attribute h.
12 13 14 |
# File 'app/helpers/render_tree_helper.rb', line 12 def h @h end |
.options ⇒ Object
Returns the value of attribute options.
12 13 14 |
# File 'app/helpers/render_tree_helper.rb', line 12 def @options end |
Class Method Details
.children ⇒ Object
37 38 39 40 41 |
# File 'app/helpers/render_tree_helper.rb', line 37 def children unless [:children].blank? "<ol>#{ [:children] }</ol>" end end |
.render_node(h, options) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/helpers/render_tree_helper.rb', line 14 def render_node(h, ) @h, @options = h, node = [:node] " <li> <div class='item'> #{ show_link } </div> #{ children } </li> " end |
.show_link ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'app/helpers/render_tree_helper.rb', line 28 def show_link node = [:node] ns = [:namespace] url = h.url_for(ns + [node]) title_field = node[:name] "<h4>#{ h.link_to(title_field, url) }</h4>" end |