wedge 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wedge/component.rb +1 -1
- data/lib/wedge/plugins/validations.rb +2 -2
- data/lib/wedge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14fdff9a126524e75e3a911c9c8352a556bfd72c
|
4
|
+
data.tar.gz: 97952d7d42f8acd95161ef132f84931d4732ea9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abe50187cd8c209599edaa98cd99a8950f86e9c262bb94b6bb5ab7311d0e17928880553433a40a371b0f6008d8d3f32578f5c3bfb06db6bdd18b3c6e1b797667
|
7
|
+
data.tar.gz: f46c90645196a0461a1a624442df04cd0b707ffb831e06ce2e2d7ec8c815c2fa1f4b59a380a800c566bebc5c0b8f29b1e192cc214187647621c41e018833c414
|
data/lib/wedge/component.rb
CHANGED
@@ -293,7 +293,7 @@ module Wedge
|
|
293
293
|
alias_method :function, :wedge_function
|
294
294
|
|
295
295
|
def wedge_from_server?
|
296
|
-
!
|
296
|
+
!scope.respond_to?(:request) || (request && !request.env.include?('HTTP_X_WEDGE_METHOD_REQUEST'))
|
297
297
|
end
|
298
298
|
alias_method :from_server?, :wedge_from_server?
|
299
299
|
|
@@ -130,11 +130,11 @@ module Wedge
|
|
130
130
|
if att.is_a? Array
|
131
131
|
att.each { |a| assert_present(a, error = [a, :not_present])}
|
132
132
|
else
|
133
|
-
if
|
133
|
+
if form_name = _form[att]
|
134
134
|
options = {}
|
135
135
|
options[:key] = _options[:key] if _options.key? :key
|
136
136
|
|
137
|
-
f =
|
137
|
+
f = wedge(form_name, _attributes.send(att).attributes, init: options)
|
138
138
|
assert(f.valid?, [att, f.errors])
|
139
139
|
else
|
140
140
|
assert(!_attributes.send(att).to_s.empty?, error)
|
data/lib/wedge/version.rb
CHANGED