Skip to content

Commit

Permalink
Upgrade to rails 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminSchaaf committed May 27, 2024
1 parent 0f309d8 commit 9b822e4
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 68 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '~> 6.0.0'
gem 'rails', '~> 6.1.0'
gem 'rake', '~> 12.0'
# Use postgres
gem 'pg', '~> 1.0'
Expand Down
131 changes: 67 additions & 64 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.6.1)
actionpack (= 6.0.6.1)
actioncable (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.6.1)
actionpack (= 6.0.6.1)
activejob (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
actionmailbox (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
mail (>= 2.7.1)
actionmailer (6.0.6.1)
actionpack (= 6.0.6.1)
actionview (= 6.0.6.1)
activejob (= 6.0.6.1)
actionmailer (6.1.7.7)
actionpack (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activesupport (= 6.1.7.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.6.1)
actionview (= 6.0.6.1)
activesupport (= 6.0.6.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.7.7)
actionview (= 6.1.7.7)
activesupport (= 6.1.7.7)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.6.1)
actionpack (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
actiontext (6.1.7.7)
actionpack (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
nokogiri (>= 1.8.5)
actionview (6.0.6.1)
activesupport (= 6.0.6.1)
actionview (6.1.7.7)
activesupport (= 6.1.7.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -46,25 +48,27 @@ GEM
activerecord (>= 4.2.0)
active_record_union (1.3.0)
activerecord (>= 4.0)
activejob (6.0.6.1)
activesupport (= 6.0.6.1)
activejob (6.1.7.7)
activesupport (= 6.1.7.7)
globalid (>= 0.3.6)
activemodel (6.0.6.1)
activesupport (= 6.0.6.1)
activerecord (6.0.6.1)
activemodel (= 6.0.6.1)
activesupport (= 6.0.6.1)
activestorage (6.0.6.1)
actionpack (= 6.0.6.1)
activejob (= 6.0.6.1)
activerecord (= 6.0.6.1)
activemodel (6.1.7.7)
activesupport (= 6.1.7.7)
activerecord (6.1.7.7)
activemodel (= 6.1.7.7)
activesupport (= 6.1.7.7)
activestorage (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activesupport (= 6.1.7.7)
marcel (~> 1.0)
activesupport (6.0.6.1)
mini_mime (>= 1.1.0)
activesupport (6.1.7.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
airbrussh (1.5.2)
Expand Down Expand Up @@ -164,8 +168,8 @@ GEM
ffi (1.16.3)
font-awesome-rails (4.7.0.8)
railties (>= 3.2, < 8.0)
globalid (1.1.0)
activesupport (>= 5.0)
globalid (1.2.1)
activesupport (>= 6.1)
graph_matching (0.1.1)
rgl (~> 0.5.0)
haml (6.1.4)
Expand Down Expand Up @@ -274,20 +278,20 @@ GEM
ruby-openid (>= 2.1.8)
rack-test (2.1.0)
rack (>= 1.3)
rails (6.0.6.1)
actioncable (= 6.0.6.1)
actionmailbox (= 6.0.6.1)
actionmailer (= 6.0.6.1)
actionpack (= 6.0.6.1)
actiontext (= 6.0.6.1)
actionview (= 6.0.6.1)
activejob (= 6.0.6.1)
activemodel (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
bundler (>= 1.3.0)
railties (= 6.0.6.1)
rails (6.1.7.7)
actioncable (= 6.1.7.7)
actionmailbox (= 6.1.7.7)
actionmailer (= 6.1.7.7)
actionpack (= 6.1.7.7)
actiontext (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activemodel (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
bundler (>= 1.15.0)
railties (= 6.1.7.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
Expand All @@ -303,12 +307,12 @@ GEM
json
require_all (~> 3.0)
ruby-progressbar
railties (6.0.6.1)
actionpack (= 6.0.6.1)
activesupport (= 6.0.6.1)
railties (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.1.1)
rake (12.3.3)
redcarpet (3.6.0)
Expand Down Expand Up @@ -403,13 +407,12 @@ GEM
sysexits (1.2.0)
temple (0.10.3)
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.3.0)
timeout (0.4.0)
tournament-system (2.1.0)
graph_matching (~> 0.1.1)
tzinfo (1.2.11)
thread_safe (~> 0.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.8.0)
Expand Down Expand Up @@ -464,7 +467,7 @@ DEPENDENCIES
pagedown-bootstrap-rails
parallel_tests
pg (~> 1.0)
rails (~> 6.0.0)
rails (~> 6.1.0)
rails_best_practices
rake (~> 12.0)
redcarpet
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Application < Rails::Application
config.exceptions_app = self.routes

# News config file
config.news = config_for(:news)
config.news = config_for(:news).with_indifferent_access

# config.middleware.use 'BadMultipartFormDataSanitizer'
config.middleware.insert_before Rack::Runtime, BadMultipartFormDataSanitizer
Expand Down
3 changes: 1 addition & 2 deletions lib/validators/reduce_errors_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ def validate_each(record, attribute, _value)
errors = record.errors
return until errors.messages.key? attribute

error = errors[attribute]
error.slice!(-1) until error.size <= 1
errors.objects.uniq!(&:attribute)
end
end

0 comments on commit 9b822e4

Please sign in to comment.