2
3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'app/helpers/workbench/smart_selector_helper.rb', line 2
def smart_selector(params)
content_tag(:div, '', data: {
'smart-selector' => true,
'smart-selector-model' => params[:model],
'smart-selector-target' => params[:target],
'smart-selector-klass' => params[:klass],
'smart-selector-field-object' => params[:field_object],
'smart-selector-field-property' => params[:field_property],
'smart-selector-title' => params[:title],
'smart-selector-current-object-id' => params[:current]&.id,
'smart-selector-current-object-label' => label_for(params[:current])
})
end
|