Skip to content

Commit

Permalink
stop using private methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Aug 11, 2010
1 parent e1b85c3 commit 8464ee0
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,7 +291,7 @@ def find_one(id)
record = where(primary_key.eq(id)).first

unless record
conditions = arel.send(:where_clauses).join(', ')
conditions = arel.wheres.map { |x| x.value }.join(', ')
conditions = " [WHERE #{conditions}]" if conditions.present?
raise RecordNotFound, "Couldn't find #{@klass.name} with ID=#{id}#{conditions}"
end
Expand All @@ -317,7 +317,7 @@ def find_some(ids)
if result.size == expected_size
result
else
conditions = arel.send(:where_clauses).join(', ')
conditions = arel.wheres.map { |x| x.value }.join(', ')
conditions = " [WHERE #{conditions}]" if conditions.present?

error = "Couldn't find all #{@klass.name.pluralize} with IDs "
Expand Down

0 comments on commit 8464ee0

Please sign in to comment.