Skip to content

Conversation

@aaronskiba
Copy link
Contributor

This PR addresses the following deprecation warnings (the warnings were encountered when executing bundle exec rspec):

  1.  DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. 
     (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack- 
     7.1.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:43)
    
  2. Added coder: and type: keywords in various places

    Example warning (before adding type: keyword in app/models/user.rb:

    Please pass the class as a keyword argument:
    
    serialize :prefs, type: Hash
    (called from <class:User> at /path/to/app/models/user.rb:73)
    DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 
    7.2.
    

Added `coder:` and `type:` keywords in various places to address deprecation warnings.

Example warning (before adding `type: ` keyword in `app/models/user.rb`:
````
Please pass the class as a keyword argument:

  serialize :prefs, type: Hash
 (called from <class:User> at /path/to/app/models/user.rb:73)
DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 7.2.
```
This change addresses the following deprecation warnings:
```
DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:43)
DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/show_exceptions.rb:36)
```
@github-actions
Copy link

github-actions bot commented Sep 4, 2024

</tr>
1 Error
🚫

Please include a CHANGELOG entry.

You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).

Generated by 🚫 Danger

@aaronskiba
Copy link
Contributor Author

Some of the PostgreSQL tests are failing, but that is independent of these PR changes. Those failing tests are addressed here in the following PR: #3451

@aaronskiba aaronskiba merged commit f25763c into rails7 Sep 5, 2024
@aaronskiba aaronskiba deleted the aaron/rails7-copy branch September 5, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants