unpoly-rails 3.2.2 → 3.3.0
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/README.md +6 -0
- data/assets/unpoly/unpoly.es6.js +375 -307
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +383 -319
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/change.rb +7 -3
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
data/lib/unpoly/rails/change.rb
CHANGED
@@ -143,16 +143,20 @@ module Unpoly
|
|
143
143
|
# the validation.
|
144
144
|
#
|
145
145
|
# Note that multiple validating form fields may be batched into a single request.
|
146
|
-
def validate_names
|
146
|
+
memoize def validate_names
|
147
147
|
validate_names_from_request
|
148
148
|
end
|
149
149
|
|
150
|
-
|
150
|
+
def validate_name
|
151
151
|
if validating?
|
152
|
-
|
152
|
+
validate_names.first
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
|
+
def validate_name?(name)
|
157
|
+
!!validate_names&.include?(name.to_s)
|
158
|
+
end
|
159
|
+
|
156
160
|
##
|
157
161
|
# Returns whether the current form submission should be
|
158
162
|
# [validated](https://unpoly.com/input-up-validate) (and not be saved to the database).
|
data/lib/unpoly/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unpoly-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|