Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11355 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

[PATCH] expressions in calculations no longer working

Reported by: nbugajski Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: patch
Cc:

Description

Prior to [9018], one could pass an expression into a calculation and have it solved by the database.

Person.sum("2 * age")
Person.minimum("HOUR(created_at)")

Ideally a patch for this would parse the expression and add the table information like [9018] intended, but that is probably overkill for this feature.

Attachments

fix_calculation_expression_support.diff (1.9 kB) - added by nbugajski on 03/15/08 02:36:25.
fix_calculation_expression_support_2.diff (1.9 kB) - added by cavalle on 03/15/08 22:17:58.

Change History

03/15/08 02:36:25 changed by nbugajski

  • attachment fix_calculation_expression_support.diff added.

03/15/08 22:17:58 changed by cavalle

  • attachment fix_calculation_expression_support_2.diff added.

03/15/08 22:19:25 changed by cavalle

  • keywords set to patch.

One test failed with the first version of the patch. New version attached

03/17/08 04:02:37 changed by david

  • status changed from new to closed.
  • resolution set to fixed.

(In [9043]) Ensure that you can still do expressions in calculations (closes #11355) [nbugajski/cavelle]