提交 3c11e926 编写于 作者: A Aaron Patterson

stop using private methods

上级 25f1e015
......@@ -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
......@@ -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 "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册