Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 7 default_timezone is a module instance variable #1230

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Rails 7 default_timezone is a module instance variable #1230

merged 1 commit into from
Jun 25, 2021

Conversation

yahonda
Copy link
Contributor

@yahonda yahonda commented Jun 15, 2021

This commit addresses the following failure.

$ bundle exec rspec ./spec/ransack/adapters/active_record/base_spec.rb:316
Run options: include {:locations=>{"./spec/ransack/adapters/active_record/base_spec.rb"=>[316]}}
========================================================================================
Running Ransack specs with SQLite, Active Record 7.0.0.alpha, Arel 10.0.0 and Ruby 3.0.1
========================================================================================
F

Failures:

  1) Ransack::Adapters::ActiveRecord::Base#ransacker should function correctly with a multi-parameter attribute
     Failure/Error: ::ActiveRecord::Base.default_timezone = :utc

     NoMethodError:
       undefined method `default_timezone=' for ActiveRecord::Base:Class
       Did you mean?  default_timezone
     # /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
     # ./spec/ransack/adapters/active_record/base_spec.rb:317:in `block (3 levels) in <module:ActiveRecord>'

Finished in 0.89225 seconds (files took 1.47 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/ransack/adapters/active_record/base_spec.rb:316 # Ransack::Adapters::ActiveRecord::Base#ransacker should function correctly with a multi-parameter attribute

Coverage report generated for RSpec to /home/yahonda/src/github.com/activerecord-hackery/ransack/coverage. 156 / 192 LOC (81.25%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
$

Fixes #1229
Refer rails/rails@c6e4dbe

This commit addresses the following failure.

```
$ bundle exec rspec ./spec/ransack/adapters/active_record/base_spec.rb:316
Run options: include {:locations=>{"./spec/ransack/adapters/active_record/base_spec.rb"=>[316]}}
========================================================================================
Running Ransack specs with SQLite, Active Record 7.0.0.alpha, Arel 10.0.0 and Ruby 3.0.1
========================================================================================
F

Failures:

  1) Ransack::Adapters::ActiveRecord::Base#ransacker should function correctly with a multi-parameter attribute
     Failure/Error: ::ActiveRecord::Base.default_timezone = :utc

     NoMethodError:
       undefined method `default_timezone=' for ActiveRecord::Base:Class
       Did you mean?  default_timezone
     # /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
     # ./spec/ransack/adapters/active_record/base_spec.rb:317:in `block (3 levels) in <module:ActiveRecord>'

Finished in 0.89225 seconds (files took 1.47 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/ransack/adapters/active_record/base_spec.rb:316 # Ransack::Adapters::ActiveRecord::Base#ransacker should function correctly with a multi-parameter attribute

Coverage report generated for RSpec to /home/yahonda/src/github.com/activerecord-hackery/ransack/coverage. 156 / 192 LOC (81.25%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
$
```
Fixes #1229
Refer rails/rails@c6e4dbe
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Even if this was just deprecated in the end, it makes sense to use the blessed way :)

@deivid-rodriguez deivid-rodriguez merged commit cb05247 into activerecord-hackery:master Jun 25, 2021
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.

CI against Rails master fails since rails/rails#42445
2 participants