1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

21 commits

Author SHA1 Message Date
Yehuda Katz + Carl Lerche
80f1f863cd Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]"
This reverts commit 4851ca9e13.

The tests do not pass for postgresql.
2009-06-22 12:04:02 -07:00
Patrick Joyce
4851ca9e13 Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-06-21 22:07:23 +01:00
Emilio Tagua
db892ea775 Fix duplicated test name
[#2581 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-04-29 15:46:43 -07:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Pratik Naik
df8669d4b5 Fix calculation tests to work on sqlite 2009-03-07 16:36:40 +00:00
stopdropandrew
6543426c73 Ensure calculations respect scoped :select [#1334 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 15:26:56 +00:00
Will Bryant
7fb7b48a1f Allow :having conditions to be sanitized like regular :condition. [#2158 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-06 22:29:53 +00:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Frederick Cheung
355f41d8aa Rework ActiveSupport::OrderedHash to make lookups faster
[#1352 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-12-10 09:07:47 -08:00
Ken Collins
57d795bad4 Make sure any Fixnum returned by a DB sum is type cast to a Float before standard converstion to a BigDecimal [#8994 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-13 10:45:57 -06:00
Pratik Naik
9599948fbc Ensure Model.sum and Model.avg typecast appropriately. [#1066 state:resolved]
Model.sum delegates typecasting to the column being summed. If that's not feasible, returns a string.
Model.avg always returns big decimal.
2008-10-04 20:13:44 +01:00
Ben Munat
ddab9d7fdf Add :from option to calculations. [#397 state:resolved] 2008-06-11 18:07:57 -07:00
Pratik Naik
bd75a722a2 Ensure AR#sum result is typecasted properly 2008-06-02 20:41:11 +01:00
Jonathan Viney
4210d85a3f Ensure Associations#sum returns 0 when no rows are returned. [#295 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-02 12:50:44 +01:00
Rick Olson
78c2d9fc22 ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [kamal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:20:33 +00:00
Michael Koziarski
50538fb524 Don't double include DISTINCT when the user has already specified it. Closes #11502 [kenneth.kalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-04 12:06:22 +00:00
David Heinemeier Hansson
9e4558671c Ensure that you can still do expressions in calculations (closes #11355) [nbugajski/cavelle]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 04:02:34 +00:00
Jeremy Kemper
5bbc461fcb Fix calculations on associations with custom :foreign_key. Closes #8117 [kamal, jack]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 04:28:42 +00:00
Jeremy Kemper
39814fcce0 Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
1e70928014 Fix paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2 Move tests to cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00
Renamed from activerecord/test/calculations_test.rb (Browse further)