Permalink
Browse files

No need to branch after return

  • Loading branch information...
1 parent 8f9c0ea commit f654bd77b11c52f05e843835eceefabdb87eccad twinturbo committed Apr 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/relation/calculations.rb
@@ -127,10 +127,10 @@ def pluck(column_name)
if eager_loading? || (includes_values.present? && references_eager_loaded_tables?)
return construct_relation_for_association_calculations.pluck(column_name)
- else
- result = klass.connection.select_all(select(column_name).arel, nil, bind_values)
end
+ result = klass.connection.select_all(select(column_name).arel, nil, bind_values)
+
types = result.column_types.merge klass.column_types
column = types[key]

0 comments on commit f654bd7

Please sign in to comment.