bullet_train-fields 1.8.1 → 1.8.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293eb19228b38b3ea231a3a7fbab301dabf209824f6e038c4fb8f1c83f0fa5eb
|
4
|
+
data.tar.gz: 2abf400571fd2b3478a6e56420136711ca48761a22b4d94f67b45ffe9c1e51b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b11da4ab5bd28041c585d110e30df0b3110f49ae8fefce98fc5a08203a5bcdcf4f69e37c04ff889e6509978b2025edd061ed8c622e58f172a16339cde9094fd
|
7
|
+
data.tar.gz: 5c3209a6d15d9ba86d8c65f67995123fee529555dd16ee9fb6f74401dd4ea90abde95bf34b43188eabb3df048c56288295f7256b0ea5f247379b25162996dcea
|
@@ -32,7 +32,7 @@ export default class extends Controller {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
constructNewUrlUpdatingField(fieldName, fieldValue) {
|
35
|
-
const url = new URL(
|
35
|
+
const url = new URL(this.currentUrl)
|
36
36
|
url.searchParams.set(fieldName, fieldValue)
|
37
37
|
|
38
38
|
return url.href
|
@@ -81,4 +81,9 @@ export default class extends Controller {
|
|
81
81
|
|
82
82
|
field.value = value
|
83
83
|
}
|
84
|
+
|
85
|
+
get currentUrl() {
|
86
|
+
const turboFrameWithUrl = this.element.closest("turbo-frame[src]")
|
87
|
+
return turboFrameWithUrl ? turboFrameWithUrl.src : window.location.href
|
88
|
+
}
|
84
89
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|