Skip to content

Commit

Permalink
fixing column alias resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jan 14, 2014
1 parent 91d3d00 commit fd97f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ def build_where(opts, other = [])


[@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))] [@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))]
when Hash when Hash
temp_opts = opts.dup
opts = PredicateBuilder.resolve_column_aliases(klass, opts) opts = PredicateBuilder.resolve_column_aliases(klass, opts)
temp_opts = opts.dup
attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts) attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts)


create_binds(temp_opts) create_binds(temp_opts)
Expand Down

0 comments on commit fd97f35

Please sign in to comment.