Skip to content

Commit

Permalink
No need to branch after return
Browse files Browse the repository at this point in the history
  • Loading branch information
twinturbo committed Apr 30, 2012
1 parent 8f9c0ea commit f654bd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/relation/calculations.rb
Expand Up @@ -127,10 +127,10 @@ def pluck(column_name)


if eager_loading? || (includes_values.present? && references_eager_loaded_tables?) if eager_loading? || (includes_values.present? && references_eager_loaded_tables?)
return construct_relation_for_association_calculations.pluck(column_name) return construct_relation_for_association_calculations.pluck(column_name)
else
result = klass.connection.select_all(select(column_name).arel, nil, bind_values)
end end


result = klass.connection.select_all(select(column_name).arel, nil, bind_values)

types = result.column_types.merge klass.column_types types = result.column_types.merge klass.column_types
column = types[key] column = types[key]


Expand Down

0 comments on commit f654bd7

Please sign in to comment.