Skip to content

Commit

Permalink
Proposed solution for ActiveRecord deprecation in Rails 7.0 (binarylo…
Browse files Browse the repository at this point in the history
…gic#743)

* Proposed solution for ActiveRecord deprecation in Rails 7.0

* Fixed deprecated RuboCop tag

* Removed commented-out lines

* Disabled Rubocop warning for legacy method

* Reversed change to Rubocop version
  • Loading branch information
danlaffan committed Oct 19, 2021
1 parent 0cdd582 commit 09a244e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Please use github issues only for bug reports and feature suggestions.
### Usage Questions

Please ask usage questions on
[stackoverflow](http://stackoverflow.com/questions/tagged/authlogic).
[Stack Overflow](http://stackoverflow.com/questions/tagged/authlogic).

## Development

Expand All @@ -33,8 +33,21 @@ ruby. See `required_ruby_version` in the gemspec.
Tests can be run against different versions of Rails:

```
# Rails 5.2
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle exec rake
# Rails 6.0
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rake
# Rails 6.1
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle exec rake
# Rails 7.0
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle exec rake
```

To run a single test:
Expand Down
2 changes: 1 addition & 1 deletion lib/authlogic/session/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ def search_scope

# @api private
def set_last_request_at
current_time = klass.default_timezone == :utc ? Time.now.utc : Time.now
current_time = Time.current
MagicColumn::AssignsLastRequestAt
.new(current_time, record, controller, last_request_at_threshold)
.assign
Expand Down

0 comments on commit 09a244e

Please sign in to comment.