Closed defaultzero closed 4 years ago
Solved the issue. The params are inserted differently than in 0.40
BEFORE (Incorrect)
def datatable
respond_to do |format|
format.json { render json: ModelDatatable.new(view_context) }
end
end
AFTER (Correct)
def datatable
respond_to do |format|
format.json { render json: ModelDatatable.new(params, view_context: view_context) }
end
end
I can't for the life of me figure out why I keep getting this error. Any help would be greatly appreciated.
RUBY RAILS Rails 6.0.2.2 Ruby 2.6.4p104
GEM USED using ajax-datatables-rails (1.2.0)
WEBPACKER JS FILES "datatables.net": "^1.10.20", "datatables.net-bs": "^1.10.20", "datatables.net-bs4": "1.10.20", "datatables.net-buttons": "^1.6.1", "datatables.net-buttons-bs": "^1.6.1", "datatables.net-keytable": "2.5.1", "datatables.net-keytable-bs": "2.5.1", "datatables.net-responsive": "^2.2.3", "datatables.net-responsive-bs": "^2.2.3", "datatables.net-select": "^1.3.1", "datatables.net-select-bs": "^1.3.1",
Datatable Class
Javascript