stop using deprecated arel API

This commit is contained in:
Aaron Patterson 2010-10-12 14:32:14 -07:00
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