Browse files

Fix PR #6091

1. ActiveRecord::Base is not ActiveRecord::Relation
2. The order of records from an SQL query is uncertain without an ORDER clause
3. Run your own tests when submitting a pull request
  • Loading branch information...
1 parent b7ec875 commit 838101ae04be06138f1bd7418473092b92754293 @pixeltrix pixeltrix committed Apr 30, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 activerecord/lib/active_record/querying.rb
  2. +1 −1 activerecord/test/cases/calculations_test.rb
@@ -11,7 +11,7 @@ module Querying
delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins,
:where, :preload, :eager_load, :includes, :from, :lock, :readonly,
:having, :create_with, :uniq, :references, :none, :to => :scoped
- delegate :count, :average, :minimum, :maximum, :sum, :calculate, :pluck, :to => :scoped
+ delegate :count, :average, :minimum, :maximum, :sum, :calculate, :pluck, :ids, :to => :scoped
# Executes a custom SQL query against your database and returns all the results. The results will
# be returned as an array with columns requested encapsulated as attributes of the model you call
@@ -467,6 +467,6 @@ def test_pluck_not_auto_table_name_prefix_if_column_joined
def test_plucks_with_ids
- assert_equal, Company.ids
+ assert_equal, Company.ids.sort

0 comments on commit 838101a

Please sign in to comment.