Sha256: b8b6c2a370f9b9192c67aca19779dca860617cb5eb1d5a3e85adffa8f7f0babb
Contents?: true
Size: 421 Bytes
Versions: 1
Compression:
Stored size: 421 Bytes
Contents
class IndentedCollectionSelectInput < SimpleForm::Inputs::CollectionSelectInput def input label_method, value_method = detect_collection_methods collection.map! do |o| depth_method = options[:depth_method] || :depth spacing = (options[:spacing] || 3).to_i label = "\u202f" * spacing * o.send(depth_method) + o.send(label_method) [label, o.send(value_method)] end super end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jquery_sortable_tree-3.0.0 | app/inputs/indented_collection_select_input.rb |