wedge 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c28c7cc402cb626100b4890daa762072096d0e0a
4
- data.tar.gz: 1f0c5c2356493eb129497d939b888d36ac8904ce
3
+ metadata.gz: 14fdff9a126524e75e3a911c9c8352a556bfd72c
4
+ data.tar.gz: 97952d7d42f8acd95161ef132f84931d4732ea9a
5
5
  SHA512:
6
- metadata.gz: 69e20c930d5eab6c1de8a456ffd0975529a7f9198d8b50bab204a5e294168660681629266807c0523e5dc3cb6534ea4be6a4110306a1cceeca381afd4022830f
7
- data.tar.gz: 41a17bed621248980ec71dca986af93c84a93f50dd9376df91b94b32498b821701e3ce2f695b2a7950206b3d6e8a855776ee680f63535c95a4c7d462f5bd5bb7
6
+ metadata.gz: abe50187cd8c209599edaa98cd99a8950f86e9c262bb94b6bb5ab7311d0e17928880553433a40a371b0f6008d8d3f32578f5c3bfb06db6bdd18b3c6e1b797667
7
+ data.tar.gz: f46c90645196a0461a1a624442df04cd0b707ffb831e06ce2e2d7ec8c815c2fa1f4b59a380a800c566bebc5c0b8f29b1e192cc214187647621c41e018833c414
@@ -293,7 +293,7 @@ module Wedge
293
293
  alias_method :function, :wedge_function
294
294
 
295
295
  def wedge_from_server?
296
- !defined?(request) || (request && !request.env.include?('HTTP_X_WEDGE_METHOD_REQUEST'))
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 klass = _form[att]
133
+ if form_name = _form[att]
134
134
  options = {}
135
135
  options[:key] = _options[:key] if _options.key? :key
136
136
 
137
- f = klass.new(_attributes.send(att).attributes, options)
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)
@@ -1,3 +1,3 @@
1
1
  module Wedge
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj