Sha256: 37176bc8cb71de40b5dcfa38a934f5b042303b72934bb58334e53622b4711031
Contents?: true
Size: 620 Bytes
Versions: 3
Compression:
Stored size: 620 Bytes
Contents
module JquerySortableTreeHelper module RenderNestedOptionsHelper class Render < JquerySortableTreeHelper::RenderSortableTreeHelper::Render def render_node @h.content_tag(:option, options[:node].send(options[:title]), tag_options) + children end def children @options[:children].html_safe end def tag_options opts = { class: "l_#{@options[:level]}", value: @options[:node][:id] } if @options[:selected] == @options[:node] opts[:class] += ' selected' opts[:selected] = :selected end opts end end end end
Version data entries
3 entries across 3 versions & 1 rubygems