:ruby data_attributes = { 'awesome-nested-set-item': true, 'awesome-nested-set-item-uid': resource.to_param, 'awesome-nested-set-item-on-drop-target': url_for([:reposition, resource]) } data_attributes['awesome-nested-set-item-scope'] = options[:scope].call(resource) if options[:scope].present? %span.btn.btn-sm.btn-xs.btn-default.awesome-nested-set-item{ data: data_attributes } %i.fas.fa-sort