diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index fbafd6b..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.2 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 36831b5..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,96 +0,0 @@ -PATH - remote: . - specs: - sea_food (0.1.0) - activemodel (>= 5.2) - activesupport (>= 5.2) - -GEM - remote: https://rubygems.org/ - specs: - activemodel (6.1.7.8) - activesupport (= 6.1.7.8) - activerecord (6.1.7.8) - activemodel (= 6.1.7.8) - activesupport (= 6.1.7.8) - activesupport (6.1.7.8) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - ast (2.4.2) - concurrent-ruby (1.3.4) - database_cleaner-active_record (2.2.0) - activerecord (>= 5.a) - database_cleaner-core (~> 2.0.0) - database_cleaner-core (2.0.1) - debug (1.8.0) - irb (>= 1.5.0) - reline (>= 0.3.1) - diff-lcs (1.5.1) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - io-console (0.7.2) - irb (1.6.3) - reline (>= 0.3.0) - jaro_winkler (1.5.6) - mini_portile2 (2.8.7) - minitest (5.24.1) - parallel (1.24.0) - parser (3.3.4.2) - ast (~> 2.4.1) - racc - racc (1.8.1) - rainbow (3.1.1) - rake (10.5.0) - reline (0.5.9) - io-console (~> 0.5) - rexml (3.3.5) - strscan - rspec (3.13.0) - rspec-core (~> 3.13.0) - rspec-expectations (~> 3.13.0) - rspec-mocks (~> 3.13.0) - rspec-core (3.13.0) - rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.13.0) - rspec-support (3.13.1) - rubocop (0.80.1) - jaro_winkler (~> 1.5.1) - parallel (~> 1.10) - parser (>= 2.7.0.1) - rainbow (>= 2.2.2, < 4.0) - rexml - ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - ruby-progressbar (1.13.0) - sqlite3 (1.5.4) - mini_portile2 (~> 2.8.0) - strscan (3.1.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (1.6.1) - zeitwerk (2.6.17) - -PLATFORMS - ruby - -DEPENDENCIES - activerecord (>= 5.2) - bundler (~> 2.0) - database_cleaner-active_record (~> 2.2.0) - debug - rake (~> 10.0) - rspec (~> 3.0) - rubocop (~> 0.80.0) - sea_food! - sqlite3 (~> 1.5.0) - -BUNDLED WITH - 2.1.4 diff --git a/lib/sea_food/form.rb b/lib/sea_food/form.rb index 3671f94..e2d37e0 100644 --- a/lib/sea_food/form.rb +++ b/lib/sea_food/form.rb @@ -7,11 +7,11 @@ def validate(options = {}) end def save(options = {}) - model.save(options) if valid? + model.save(**options) if valid? end def save!(options = {}) - model.save!(options) if valid? + model.save!(**options) if valid? end private diff --git a/spec/sea_food/service_and_form_spec.rb b/spec/sea_food/service_and_form_spec.rb index b784655..f3afec7 100644 --- a/spec/sea_food/service_and_form_spec.rb +++ b/spec/sea_food/service_and_form_spec.rb @@ -83,7 +83,7 @@ def call ) expect(result).to be_fail - expect(result.address.errors.map(&:message)).to eq(['is too short (minimum is 5 characters)']) + expect(result.errors[:address][:line1]).to eq(['is too short (minimum is 5 characters)']) end it '.call - with failed execution' do