reform 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 0d94ac5f49b9f57ec0fb4c215de22120c7dda916
4
- data.tar.gz: c06cc0d203942de3501fc7a26ef653b26eb7ec36
3
+ metadata.gz: 66d8c635567dc8211aecd707abdb5e087091a31c
4
+ data.tar.gz: 651a3fe9eef9a320329de238b7fdb8782d0d5400
5
5
  SHA512:
6
- metadata.gz: d601af3a2a19bc070cbb84f0dc8bfd160ad2f839cf00054f8ad98e655dbce6e254bccd9541f9612ae1bf4a6acf6e1e3482f4319610c327db0701a4cec508a0f5
7
- data.tar.gz: f37b1d69a3240b8a3e153e286b6e1130afbf6557ff3d9a5faf7adf786573bdc52b7a8cb7ac0d2649c1a3710623e96d1b6bb70335b3688a6189fc56f7f80a5777
6
+ metadata.gz: 11fd15d412d2184659d601891e612a7e103e3c9a90240356dea9124fd17c8f8422a4018ca46c4bb66cfc3074199e37b046032b77859d186887db161e0d91b02a
7
+ data.tar.gz: 752b5e00845adf198af51a556c9f7c2ef63bd86ca08fce45585c8ccbf2e22e7a1ee9fb1081a2fd7edc06025233c7c345c8774ff8d473955a9d0e80b40c522c37
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.3
2
+
3
+ * Systematically use `fields` when saving the form. This avoids calling presentational readers that might have been defined by the user.
4
+
1
5
  ## 1.0.2
2
6
 
3
7
  * The following property names are reserved and will raise an exception: `[:model, :aliased_model, :fields, :mapper]`
Binary file
@@ -38,7 +38,7 @@ module Reform::Contract::Validate
38
38
  prefix = options[:prefix]
39
39
 
40
40
  # call valid? recursively and collect nested errors.
41
- mapper.new(self).extend(NestedValid).to_hash(options)
41
+ mapper.new(fields).extend(NestedValid).to_hash(options) # TODO: only include nested forms here.
42
42
 
43
43
  valid? # this validates on <Fields> using AM::Validations, currently.
44
44
 
@@ -64,7 +64,7 @@ module Reform::Form::Composition
64
64
  end
65
65
 
66
66
  def to_hash(*args)
67
- mapper.new(self).to_hash(*args)
67
+ mapper.new(fields).to_hash(*args)
68
68
  end
69
69
 
70
70
  private
@@ -24,7 +24,7 @@ module Reform::Form::Save
24
24
 
25
25
  def save!
26
26
  save_model
27
- mapper.new(self).extend(RecursiveSave).to_hash # save! on all nested forms.
27
+ mapper.new(fields).extend(RecursiveSave).to_hash # save! on all nested forms. # TODO: only include nested forms here.
28
28
  end
29
29
 
30
30
  def save_model
@@ -1,3 +1,3 @@
1
1
  module Reform
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reform
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-07 00:00:00.000000000 Z
12
+ date: 2014-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: representable