Skip to content

Commit

Permalink
stop using deprecated arel API
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 12, 2010
1 parent 869118a commit 85ffbfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/relation/finder_methods.rb
Expand Up @@ -291,8 +291,8 @@ def find_one(id)
record = where(primary_key.eq(id)).first record = where(primary_key.eq(id)).first


unless record unless record
conditions = arel.wheres.map { |x| x.value }.join(', ') conditions = arel.where_sql
conditions = " [WHERE #{conditions}]" if conditions.present? conditions = " [#{conditions}]" if conditions
raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}" raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}"
end end


Expand Down

0 comments on commit 85ffbfe

Please sign in to comment.