Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with wrong argument type when using prefetch_primary_key?
- Loading branch information
1 parent
00dfa10
commit e1a3add
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
class PostWithPrefetchedPk < ActiveRecord::Base | ||
self.table_name = "posts" | ||
|
||
class << self | ||
def prefetch_primary_key? | ||
true | ||
end | ||
|
||
def next_sequence_value | ||
123456 | ||
end | ||
end | ||
end |