stop using deprecated arel API
This commit is contained in:
parent
879cac5d76
commit
603406dc53
@ -291,8 +291,8 @@ def find_one(id)
|
||||
record = where(primary_key.eq(id)).first
|
||||
|
||||
unless record
|
||||
conditions = arel.wheres.map { |x| x.value }.join(', ')
|
||||
conditions = " [WHERE #{conditions}]" if conditions.present?
|
||||
conditions = arel.where_sql
|
||||
conditions = " [#{conditions}]" if conditions
|
||||
raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user