diff --git a/app/helpers/effective_datatables_private_helper.rb b/app/helpers/effective_datatables_private_helper.rb index dd2ddb2..ff92ae5 100644 --- a/app/helpers/effective_datatables_private_helper.rb +++ b/app/helpers/effective_datatables_private_helper.rb @@ -48,7 +48,7 @@ def datatable_new_resource_button(datatable, name, column) action = { action: :new, class: "btn #{btn_class}", 'data-remote': true } if column[:actions][:new].kind_of?(Hash) # This might be active_record_array_collection? - actions = action.merge(column[:actions][:new]) + action = action.merge(column[:actions][:new]) effective_resource = (datatable.effective_resource || datatable.fallback_effective_resource) klass = (column[:actions][:new][:klass] || effective_resource&.klass || datatable.collection_class)