stimulus_reflex_globalid 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -42
- data/lib/stimulus_reflex_globalid/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd8692330ce7e104f0037b1e3d0fcb4e9213fc898c9e743bf6ceeb21d131bc63
|
4
|
+
data.tar.gz: ccb9755a86eb9849ed779b45d4961d0e1d8db584394c180bc211de8d086f2217
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a260a11b8a4c0cfc82a9b85efee19453bde1832847ee6ae2a2eb4790b78704f0e4b4d5c837d91aba3710585311c03aa322912deb8d364a22053bc414a0e26e60
|
7
|
+
data.tar.gz: 9b456b6fdd9c883402093a215f894c2decb8ea4b53ccf95a52dd53eae35be0aec5fe9f6e171e3f8d7a11f121ff7654bb9465c446027855342718270cdcc71293
|
data/README.md
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
# StimulusReflexGlobalid
|
2
|
-
|
3
|
-
StimulusReflexGlobalId maps global IDs to instance variables during a reflex.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
`bundle add stimulus_reflex_globalid`
|
7
|
-
|
8
|
-
## Usage
|
9
|
-
|
10
|
-
No setup is required to use this library.
|
11
|
-
|
12
|
-
In your markup, specific data-reflex and data attributes as normal
|
13
|
-
|
14
|
-
```erb
|
15
|
-
<button data-reflex="click->MyReflex#handle_click" data-foo="<%= @foo.to_global_id %>"
|
16
|
-
```
|
17
|
-
|
18
|
-
When the button is clicked, an instance variable `@foo` will be created, set to `@foo`.
|
19
|
-
|
20
|
-
```rb
|
21
|
-
class MyReflex < ApplicationReflex
|
22
|
-
def handle_click
|
23
|
-
p @foo
|
24
|
-
end
|
25
|
-
end
|
26
|
-
```
|
27
|
-
|
28
|
-
You can also use signed IDs.
|
29
|
-
|
30
|
-
## Configuring
|
31
|
-
|
32
|
-
You can turn off signed/unsigned IDs by configuring the gem.
|
33
|
-
|
34
|
-
```
|
35
|
-
StimulusReflexGlobalid::Engine.configure do |config|
|
36
|
-
config.allow_signed = false # default true
|
37
|
-
config.allow_unsigned = false # default true
|
38
|
-
end
|
39
|
-
```
|
40
|
-
|
41
|
-
## License
|
42
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
1
|
+
# StimulusReflexGlobalid
|
2
|
+
|
3
|
+
StimulusReflexGlobalId maps global IDs to instance variables during a reflex.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
`bundle add stimulus_reflex_globalid`
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
No setup is required to use this library.
|
11
|
+
|
12
|
+
In your markup, specific data-reflex and data attributes as normal
|
13
|
+
|
14
|
+
```erb
|
15
|
+
<button data-reflex="click->MyReflex#handle_click" data-foo="<%= @foo.to_global_id %>"
|
16
|
+
```
|
17
|
+
|
18
|
+
When the button is clicked, an instance variable `@foo` will be created, set to `@foo`.
|
19
|
+
|
20
|
+
```rb
|
21
|
+
class MyReflex < ApplicationReflex
|
22
|
+
def handle_click
|
23
|
+
p @foo
|
24
|
+
end
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
You can also use signed IDs.
|
29
|
+
|
30
|
+
## Configuring
|
31
|
+
|
32
|
+
You can turn off signed/unsigned IDs by configuring the gem.
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
StimulusReflexGlobalid::Engine.configure do |config|
|
36
|
+
config.allow_signed = false # default true
|
37
|
+
config.allow_unsigned = false # default true
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
## License
|
42
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stimulus_reflex_globalid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua LeBlanc
|
@@ -14,22 +14,22 @@ dependencies:
|
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 6.0.3
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
19
|
+
version: '5.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 6.0.3
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
29
|
+
version: '5.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: stimulus_reflex
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|