aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/scaffold_generator_test.rb
diff options
context:
space:
mode:
authorErnie Miller <ernie@erniemiller.org>2012-06-24 08:39:54 -0400
committerErnie Miller <ernie@erniemiller.org>2012-06-24 08:39:54 -0400
commita1c05dd8b9bd3623289d3aa73dda2943d620cc34 (patch)
treebac4f4dfbc8d6a460b5185227fb5a8f7da342371 /railties/test/generators/scaffold_generator_test.rb
parentebe8a45444fb42b42768fba826f56a498c8b389a (diff)
downloadrails-a1c05dd8b9bd3623289d3aa73dda2943d620cc34.tar.gz
rails-a1c05dd8b9bd3623289d3aa73dda2943d620cc34.tar.bz2
rails-a1c05dd8b9bd3623289d3aa73dda2943d620cc34.zip
Stop assuming strings for grouped calculations
Execute_grouped_calculation is one of those places where ActiveRecord forgets that it has ARel underpinnings, and assumes that the values provided to group_values are strings. This artificially hobbles otherwise functional code. This patch stops assuming that incoming values respond to to_sym, stops using string interpolation for table aliases on objects that support aliasing, and stops unnecessarily joining group_values on the relation. Additionally, it calls to_sql, if available, on objects sent to column_alias_for, in order to get a more reasonable alias string than a non-string's default to_str method.
Diffstat (limited to 'railties/test/generators/scaffold_generator_test.rb')
0 files changed, 0 insertions, 0 deletions