diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index dc34639..f0aa093 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -4,6 +4,9 @@ on: push: branches: - main + pull_request: + branches: + - main jobs: rubocop: diff --git a/config/application.rb b/config/application.rb index 60130c3..25cc033 100644 --- a/config/application.rb +++ b/config/application.rb @@ -10,7 +10,7 @@ module CodeLearnApi class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 - + # Disable freezing of autoload_paths and eager_load_paths for Rails 8.1 compatibility # with older gems that try to modify these arrays config.autoloader = :zeitwerk diff --git a/config/boot.rb b/config/boot.rb index 4b2050d..95eda66 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -6,7 +6,7 @@ # Monkey patch Array to prevent freezing errors in Rails 8.1 # This allows older gems to modify frozen autoload_paths arrays class Array - alias_method :original_freeze, :freeze + alias original_freeze freeze def freeze # Check if this array is being set as autoload_paths or eager_load_paths