formbuilder-rb 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba39021b688857fba2a29ba89b37132da3f41aa7
4
- data.tar.gz: 76670efaf98c3781c137996f4a18f4151578795a
3
+ metadata.gz: 7a894b4589a8cef57008cf4f90c567343348d950
4
+ data.tar.gz: 6d3752d4b3e3f1ee6a82c44d7a243e97d10019c8
5
5
  SHA512:
6
- metadata.gz: 44772ca06fb009e7bd3c2e2b220814c07d233687a98921c4c657c53b388ac6b218e712cdc2403a8b728b3caf9198f38c4be2416e589c9349dffdd8736ae46bb2
7
- data.tar.gz: 5b0e3f312708d04ade5ec4ec3d7c75a448a8c85156c04ac59ceb6a80d61e599425098afe62785c2e3f11ea1bccbc3c26aded6107f82c97b86649bd6bc14259c0
6
+ metadata.gz: 64db786cdde7a337a757f9e906261f5ac37fdde9441edb02dcbedc991b862c42561a0431c1bf8495bd29e259e915c0f090c4d52e84618ee3aa49fdcefbddaae6
7
+ data.tar.gz: d5d483d47ca724698226ea107027b9832b774b127f0cb49e43b60ff85c646221f7abb3065f23e7af6b1902b334216c1d742d2090dc0e6a85f3482f4340732f9d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- formbuilder-rb (0.2.0)
4
+ formbuilder-rb (0.2.1)
5
5
  carrierwave
6
6
  erector-rails4
7
7
  geocoder
@@ -112,6 +112,7 @@ module Formbuilder
112
112
 
113
113
  def save_responses(response_field_params, response_fields, opts = {})
114
114
  set_responses({}) unless opts[:partial_update]
115
+ response_field_params ||= {}
115
116
 
116
117
  response_fields.select { |rf| rf.input_field }.each do |response_field|
117
118
  self.save_response(response_field_params[response_field.id.to_s], response_field, response_field_params)
@@ -1,3 +1,3 @@
1
1
  module Formbuilder
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -98,6 +98,10 @@ describe Formbuilder::Entry do
98
98
  entry.save_responses({ "#{first_field.id}" => 'boo' }, form.response_fields)
99
99
  entry.response_value(first_field).should == 'boo'
100
100
  end
101
+
102
+ it 'should not choke on nil' do
103
+ entry.save_responses(nil, form.response_fields)
104
+ end
101
105
  end
102
106
 
103
107
  describe '#destroy_response' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formbuilder-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Becker