vue_crud 0.1.10.4 → 0.1.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vue_crud/version.rb +1 -1
- data/vendor/assets/javascripts/vue_crud.js +6 -8
- 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: d5506ddc35db86a9d199d79187c50f987ad472ca
|
4
|
+
data.tar.gz: bc44b08230c83aa52ca748c330e11cf8a269c141
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be112a5666dc4b01b5a907b1e65f7b66d7f3cc5e155591344671e6a03b7891015eb1612a851f6c5789be697d66794ea562d569d351bc4091ece6d24660008e2
|
7
|
+
data.tar.gz: 3509c9f8f96e3b303b549ac1862fa8c9fe3264551f3d9ecab43e55d982b80aa35bb352beb5268584f2e95ccdc6488685dea1fb14c59c0a3d08a6229e492c2615
|
data/lib/vue_crud/version.rb
CHANGED
@@ -116,8 +116,8 @@ function vueCRUD_init(params = {}) {
|
|
116
116
|
}
|
117
117
|
},
|
118
118
|
mounted: function() {
|
119
|
-
event_hub.$on('update_error', function(
|
120
|
-
this.
|
119
|
+
event_hub.$on('update_error', function(errors) {
|
120
|
+
this.errors = errors;
|
121
121
|
}.bind(this));
|
122
122
|
event_hub.$on('update_action_name', function(action_name) {
|
123
123
|
this.action_name = action_name;
|
@@ -306,9 +306,8 @@ function vueCRUD_init(params = {}) {
|
|
306
306
|
updateModel: function() {
|
307
307
|
var that = this;
|
308
308
|
$.ajax({
|
309
|
-
dataType: 'json',
|
310
309
|
method: 'PATCH',
|
311
|
-
data:
|
310
|
+
data: obj_to_json(that.model),
|
312
311
|
url: that.info.url_prefix + '/' + that.model.ID + options.suffix + location.search,
|
313
312
|
beforeSend: function() {
|
314
313
|
event_hub.$emit('dimmerOn');
|
@@ -464,9 +463,8 @@ function vueCRUD_init(params = {}) {
|
|
464
463
|
restoreModel: function () {
|
465
464
|
var that = this;
|
466
465
|
$.ajax({
|
467
|
-
dataType: 'json',
|
468
466
|
method: 'POST',
|
469
|
-
data:
|
467
|
+
data: obj_to_json(that.model),
|
470
468
|
url: that.info.url_prefix + options.suffix + location.search,
|
471
469
|
success: function(res) {
|
472
470
|
event_hub.$emit('toggleRestoreSuccess');
|
@@ -479,11 +477,11 @@ function vueCRUD_init(params = {}) {
|
|
479
477
|
createModel: function () {
|
480
478
|
var that = this;
|
481
479
|
$.ajax({
|
482
|
-
dataType: 'json',
|
483
480
|
method: 'POST',
|
484
|
-
data:
|
481
|
+
data: obj_to_json(that.model),
|
485
482
|
url: that.info.url_prefix + options.suffix + location.search,
|
486
483
|
beforeSend: function() {
|
484
|
+
console.log(obj_to_json(that.model));
|
487
485
|
event_hub.$emit('dimmerOn');
|
488
486
|
$('.progress-bar').css('width', '0');
|
489
487
|
},
|