Class: RenderNestedOptionsHelper::Render
- Inherits:
-
Object
- Object
- RenderNestedOptionsHelper::Render
- Defined in:
- app/helpers/render_nested_options_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.
4 5 6 |
# File 'app/helpers/render_nested_options_helper.rb', line 4 def h @h end |
.options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'app/helpers/render_nested_options_helper.rb', line 4 def @options end |
Class Method Details
.render_node(h, options) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/render_nested_options_helper.rb', line 6 def render_node(h, ) @h, @options = h, node = [:node] this_node = [:selected] == node selected_class = this_node ? ' selected' : nil selected = this_node ? " selected='selected'" : nil " <option value='#{node[:id]}' class='l_#{ [:level] }#{selected_class}' #{selected}>#{ node[:name] }</option> #{ [:children] } " end |