bullet_train-sortable 1.0.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e84511987b36e406e093226b47388d30f93efcc481666a42718bd866ca5e13c
4
- data.tar.gz: 5e92c6e7f2ec330a6c66caa683dcc2e9665da9047a39db7cc7619d969296d070
3
+ metadata.gz: 2ee6c7f7c14019d295c69144738fa9ec71f66d6f496b53bed2d531c60bd22ae6
4
+ data.tar.gz: 81f82e2c4b041eb531cd34898c929085ebedb2e09b6498d3078f2f2fc5fb1442
5
5
  SHA512:
6
- metadata.gz: b37f7953f0229ee1bf9ff2349f01137b0a8ccfd1eb1f12efd9e3ffe1834579288368c6677346a8ce98f26a09245e446bf9256f392c8551e04076572a388a3215
7
- data.tar.gz: a79e8e3f162bcbed90578dc349a0bd83598043f58bb519eaf64cc697a8031f52094f367c621da19a8b3e0a8f5015b266115d6a0ba865031c73b3fe8d1254f558
6
+ metadata.gz: 83ff615e5473b5a572679c00612a829f69541bef34811048b33a68dc31c8887f35352bb699bec0d07b26db837d499729029af41323017f0b71ea0df2f4b937be
7
+ data.tar.gz: 8e703c9fc8be22fcb2ec469d293af6877559b77308c01637ed331df2702859aab2199a1fb4b52cd9cc7977eec74c84dabbf8ec7d7d35e777120cb1ea838336f8
@@ -1,4 +1,5 @@
1
1
  import { Controller } from "@hotwired/stimulus"
2
+ import { post } from '@rails/request.js'
2
3
  require("dragula/dist/dragula.min.css")
3
4
 
4
5
  import dragula from 'dragula';
@@ -74,7 +75,7 @@ export default class extends Controller {
74
75
  saveSortOrder() {
75
76
  var idsInOrder = Array.from(this.element.childNodes).map((el) => { return parseInt(el.dataset?.id) });
76
77
 
77
- $.post(this.reorderPathValue, {ids_in_order: idsInOrder})
78
+ post(this.reorderPathValue, { body: JSON.stringify({ids_in_order: idsInOrder}) })
78
79
  }
79
80
 
80
81
  }
@@ -2,7 +2,7 @@ module BulletTrain
2
2
  module Sortable
3
3
  class Engine < ::Rails::Engine
4
4
  initializer "bullet_train.sortable.register_routing_concerns" do |app|
5
- BulletTrain.routing_concerns << Proc.new do
5
+ BulletTrain.routing_concerns << proc do
6
6
  concern :sortable do
7
7
  collection do
8
8
  post :reorder
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Sortable
3
- VERSION = "1.0.3"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-sortable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: standard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: 7.0.0
33
+ version: 6.0.0
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: 7.0.0
40
+ version: 6.0.0
27
41
  description: Bullet Train Sortable
28
42
  email:
29
43
  - andrew.culver@gmail.com