diff --git a/Gemfile b/Gemfile index 8c25f23f6..cdce00ec3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' ruby "2.7.8" -gem 'rails', '~> 6.1.0.0' +gem 'rails', '~> 7.0.0.0' gem 'sprockets-rails', '~> 3.2.2' gem 'mysql2', '~> 0.5.0' @@ -16,13 +16,13 @@ gem 'jquery-rails' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc -gem 'devise', '~> 4.7.3' +gem 'devise', '~> 4.8.0' gem 'neat', '1.7.1' gem 'bourbon', '~> 4.2.2' gem 'draper' gem 'paperclip', '~> 6.0.0' gem 'aws-sdk-s3', '~> 1.98.0' -gem 'rails_admin','~> 2.2.1' +gem 'rails_admin','~> 3.0.0' # gem 'rails_admin', git: 'https://github.com/enmand/rails_admin.git' # rails_admin 1.1.1 has a transitive dependency on haml (~> 4.0). haml 4.0.7 in # turn has a transitive dependency on tile and does not specify a version range. diff --git a/Gemfile.lock b/Gemfile.lock index 6fa847df2..00daeb81f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,69 +1,69 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + actioncable (7.0.0) + actionpack (= 7.0.0) + activesupport (= 7.0.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actionmailbox (7.0.0) + actionpack (= 7.0.0) + activejob (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) mail (>= 2.7.1) - actionmailer (6.1.0) - actionpack (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activesupport (= 6.1.0) + actionmailer (7.0.0) + actionpack (= 7.0.0) + actionview (= 7.0.0) + activejob (= 7.0.0) + activesupport (= 7.0.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.0) - actionview (= 6.1.0) - activesupport (= 6.1.0) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.0) + actionview (= 7.0.0) + activesupport (= 7.0.0) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.0) - actionpack (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actiontext (7.0.0) + actionpack (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.0) - activesupport (= 6.1.0) + actionview (7.0.0) + activesupport (= 7.0.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.0) - activesupport (= 6.1.0) + activejob (7.0.0) + activesupport (= 7.0.0) globalid (>= 0.3.6) - activemodel (6.1.0) - activesupport (= 6.1.0) + activemodel (7.0.0) + activesupport (= 7.0.0) activemodel-serializers-xml (1.0.3) activemodel (>= 5.0.0.a) activesupport (>= 5.0.0.a) builder (~> 3.1) - activerecord (6.1.0) - activemodel (= 6.1.0) - activesupport (= 6.1.0) - activestorage (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activesupport (= 6.1.0) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) - activesupport (6.1.0) + activerecord (7.0.0) + activemodel (= 7.0.0) + activesupport (= 7.0.0) + activestorage (7.0.0) + actionpack (= 7.0.0) + activejob (= 7.0.0) + activerecord (= 7.0.0) + activesupport (= 7.0.0) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) apipie-rails (0.5.20) @@ -137,7 +137,7 @@ GEM addressable date (3.4.1) debug_inspector (1.2.0) - devise (4.7.3) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -173,9 +173,6 @@ GEM foundation_emails (2.2.1.0) globalid (1.1.0) activesupport (>= 5.0) - haml (5.2.2) - temple (>= 0.8.0) - tilt htmlentities (4.3.4) httparty (0.13.7) json (~> 1.8) @@ -196,8 +193,6 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (6.0.1) - railties (>= 3.2.16) json (1.8.6) jwt (1.2.1) kaminari (1.2.2) @@ -231,8 +226,7 @@ GEM actionpack activesupport mandrill-api (~> 1.0.9) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.4) matrix (0.4.3) method_source (1.1.0) mime-types (3.7.0) @@ -297,26 +291,22 @@ GEM rack (2.2.17) rack-cors (2.0.2) rack (>= 2.0.0) - rack-pjax (1.1.0) - nokogiri (~> 1.5) - rack (>= 1.1) rack-test (2.2.0) rack (>= 1.3) - rails (6.1.0) - actioncable (= 6.1.0) - actionmailbox (= 6.1.0) - actionmailer (= 6.1.0) - actionpack (= 6.1.0) - actiontext (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activemodel (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + rails (7.0.0) + actioncable (= 7.0.0) + actionmailbox (= 7.0.0) + actionmailer (= 7.0.0) + actionpack (= 7.0.0) + actiontext (= 7.0.0) + actionview (= 7.0.0) + activejob (= 7.0.0) + activemodel (= 7.0.0) + activerecord (= 7.0.0) + activestorage (= 7.0.0) + activesupport (= 7.0.0) bundler (>= 1.15.0) - railties (= 6.1.0) - sprockets-rails (>= 2.0.0) + railties (= 7.0.0) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -324,31 +314,25 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - rails_admin (2.2.1) + rails_admin (3.0.0) activemodel-serializers-xml (>= 1.0) - builder (~> 3.1) - haml (>= 4.0, < 6) - jquery-rails (>= 3.0, < 5) - jquery-ui-rails (>= 5.0, < 7) kaminari (>= 0.14, < 2.0) nested_form (~> 0.3) - rack-pjax (>= 0.7) - rails (>= 5.0, < 7) - remotipart (~> 1.3) - sassc-rails (>= 1.3, < 3) - railties (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + rails (>= 6.0, < 8) + turbo-rails (~> 1.0) + railties (7.0.0) + actionpack (= 7.0.0) + activesupport (= 7.0.0) method_source - rake (>= 0.8.7) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rake (13.3.0) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rdoc (4.3.0) regexp_parser (2.10.0) - remotipart (1.4.4) request_store (1.7.0) rack (>= 1.4) responders (3.1.1) @@ -412,7 +396,6 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - temple (0.10.3) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) thor (1.4.0) @@ -420,6 +403,10 @@ GEM timeout (0.4.3) treetop (1.6.14) polyglot (~> 0.3) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uglifier (4.2.1) @@ -456,7 +443,7 @@ DEPENDENCIES ckeditor (~> 4.3.0) cocoon (~> 1.2.6) coffee-rails - devise (~> 4.7.3) + devise (~> 4.8.0) dotenv-rails draper factory_bot_rails (~> 6.0.0) @@ -479,8 +466,8 @@ DEPENDENCIES pry-rails puma (~> 5.6) rack-cors - rails (~> 6.1.0.0) - rails_admin (~> 2.2.1) + rails (~> 7.0.0.0) + rails_admin (~> 3.0.0) rspec-rails sass-rails (~> 6.0.0) sdoc (~> 0.4.0) diff --git a/app/models/report.rb b/app/models/report.rb index 0e6aea4bd..a46104faa 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -101,8 +101,8 @@ def delete_and_update_all(quotes_params, log_fields, image = nil) def image_valid? return true if image.nil? unless image.valid? - image.errors.each do |k, v| - errors.add(k, v) + image.errors.each do |error| + errors.add(error.attribute, error.message) end end end