diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb index fcd25e9ff..ca1d20927 100644 --- a/app/assets/javascripts/samples/sample_datatable.js.erb +++ b/app/assets/javascripts/samples/sample_datatable.js.erb @@ -57,7 +57,7 @@ function dataTableInit() { targets: 2, render: function(data, type, row) { return "" + data + ''; + "class='sample-info-link'>" + data + ''; } }], rowCallback: function(row, data) { @@ -339,7 +339,7 @@ function onClickEdit() { saveAction = "update"; $.ajax({ - url: rowData["sampleInfoUrl"], + url: rowData["sampleEditUrl"], type: "GET", dataType: "json", success: function (data) { diff --git a/app/datatables/sample_datatable.rb b/app/datatables/sample_datatable.rb index 87411654f..2c354d4ff 100644 --- a/app/datatables/sample_datatable.rb +++ b/app/datatables/sample_datatable.rb @@ -115,6 +115,8 @@ class SampleDatatable < AjaxDatatablesRails::Base '6': record.user.full_name, 'sampleInfoUrl': Rails.application.routes.url_helpers.sample_path(record.id), + 'sampleEditUrl': + Rails.application.routes.url_helpers.edit_sample_path(record.id), 'sampleUpdateUrl': Rails.application.routes.url_helpers.sample_path(record.id) }