mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
use the columns hash for primary key lookup
This commit is contained in:
@@ -290,7 +290,7 @@ module ActiveRecord
|
||||
def find_one(id)
|
||||
id = id.id if ActiveRecord::Base === id
|
||||
|
||||
column = primary_key.column
|
||||
column = columns_hash[primary_key.name.to_s]
|
||||
|
||||
substitute = connection.substitute_for(column, @bind_values)
|
||||
relation = where(primary_key.eq(substitute))
|
||||
|
||||
Reference in New Issue
Block a user