mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
do not pass AR objects to ARel
This commit is contained in:
@@ -286,6 +286,8 @@ module ActiveRecord
|
||||
end
|
||||
|
||||
def find_one(id)
|
||||
id = id.id if ActiveRecord::Base === id
|
||||
|
||||
record = where(primary_key.eq(id)).first
|
||||
|
||||
unless record
|
||||
|
||||
Reference in New Issue
Block a user