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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5b77252e816a72e5e150c1e7e6e061562620c1f
4
- data.tar.gz: d90efbe43881a79f1515ca6cd5cf1b8e73356a71
3
+ metadata.gz: d5506ddc35db86a9d199d79187c50f987ad472ca
4
+ data.tar.gz: bc44b08230c83aa52ca748c330e11cf8a269c141
5
5
  SHA512:
6
- metadata.gz: bf6608126c26c910f51483890af1464c027c3b737687b2dc80b5249da83bd2270fe7fca7c187ea12c7d25fd9c78c9f3f959c14845f8e0a60ce65fc9a467ee8ab
7
- data.tar.gz: e0c003e7d46134f7bd1866171c9f7a18d476fda178785640b0dfdd3cbc3bd7e95a2d010a53b90a70d09fafa7c0ec083b6f4155dd150396e0c4fa2ad9aa2f60cc
6
+ metadata.gz: 6be112a5666dc4b01b5a907b1e65f7b66d7f3cc5e155591344671e6a03b7891015eb1612a851f6c5789be697d66794ea562d569d351bc4091ece6d24660008e2
7
+ data.tar.gz: 3509c9f8f96e3b303b549ac1862fa8c9fe3264551f3d9ecab43e55d982b80aa35bb352beb5268584f2e95ccdc6488685dea1fb14c59c0a3d08a6229e492c2615
@@ -1,3 +1,3 @@
1
1
  module VueCrud
2
- VERSION = "0.1.10.4"
2
+ VERSION = "0.1.10.5"
3
3
  end
@@ -116,8 +116,8 @@ function vueCRUD_init(params = {}) {
116
116
  }
117
117
  },
118
118
  mounted: function() {
119
- event_hub.$on('update_error', function(error) {
120
- this.error = error;
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: JSON.stringify(that.model),
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: JSON.stringify(that.model),
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: JSON.stringify(that.model),
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
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vue_crud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10.4
4
+ version: 0.1.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Chiang