vue_crud 0.1.10.5 → 0.1.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vue_crud/version.rb +1 -1
- data/vendor/assets/javascripts/vue_crud.js +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f970b6e94c46d91b188e9509b22dbe9e6fc41b
|
4
|
+
data.tar.gz: cac46b64f21b32caad7df449b00de0b78194ea24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d815ff0fb5633a5ce4ae58e4c105260d0380eec3525594bc9267c007b4e82231ca3f96fbceaebb476c415f6f890c01d815ba101f9b20e828625709180a390ac
|
7
|
+
data.tar.gz: fe2dbae18d2b9936e501ce26fad4dceb05c3b82925f8c137d02764dac0a604ac86f8fc90cf092d7c3461ed6e078bd4e13c2782524e383bcd34f720e6c0511bbb
|
data/lib/vue_crud/version.rb
CHANGED
@@ -274,10 +274,12 @@ function vueCRUD_init(params = {}) {
|
|
274
274
|
deleteModel: function () {
|
275
275
|
var that = this;
|
276
276
|
that.deleteMode = true;
|
277
|
+
var id = that.model.ID || that.model.id;
|
278
|
+
|
277
279
|
if(confirm("Are you sure?") == true) {
|
278
280
|
$.ajax({
|
279
281
|
method: 'DELETE',
|
280
|
-
url: that.info.url_prefix + '/' +
|
282
|
+
url: that.info.url_prefix + '/' + id + options.suffix + location.search,
|
281
283
|
success: function(res) {
|
282
284
|
that.is_deleted = true;
|
283
285
|
event_hub.$on('toggleRestoreSuccess', function() {
|
@@ -305,10 +307,11 @@ function vueCRUD_init(params = {}) {
|
|
305
307
|
},
|
306
308
|
updateModel: function() {
|
307
309
|
var that = this;
|
310
|
+
var id = that.model.ID || that.model.id;
|
308
311
|
$.ajax({
|
309
312
|
method: 'PATCH',
|
310
313
|
data: obj_to_json(that.model),
|
311
|
-
url: that.info.url_prefix + '/' +
|
314
|
+
url: that.info.url_prefix + '/' + id + options.suffix + location.search,
|
312
315
|
beforeSend: function() {
|
313
316
|
event_hub.$emit('dimmerOn');
|
314
317
|
$('.progress-bar').css('width', '0');
|