Skip to content

Commit 09a244e

Browse files
authored
Proposed solution for ActiveRecord deprecation in Rails 7.0 (#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
1 parent 0cdd582 commit 09a244e

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please use github issues only for bug reports and feature suggestions.
2121
### Usage Questions
2222

2323
Please ask usage questions on
24-
[stackoverflow](http://stackoverflow.com/questions/tagged/authlogic).
24+
[Stack Overflow](http://stackoverflow.com/questions/tagged/authlogic).
2525

2626
## Development
2727

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

3535
```
36+
# Rails 5.2
37+
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle install
38+
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle exec rake
39+
40+
# Rails 6.0
3641
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle install
3742
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rake
43+
44+
# Rails 6.1
45+
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle install
46+
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle exec rake
47+
48+
# Rails 7.0
49+
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle install
50+
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle exec rake
3851
```
3952

4053
To run a single test:

lib/authlogic/session/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ def search_scope
20312031

20322032
# @api private
20332033
def set_last_request_at
2034-
current_time = klass.default_timezone == :utc ? Time.now.utc : Time.now
2034+
current_time = Time.current
20352035
MagicColumn::AssignsLastRequestAt
20362036
.new(current_time, record, controller, last_request_at_threshold)
20372037
.assign

0 commit comments

Comments
 (0)