aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/decimal.rb
Commit message (Collapse)AuthorAgeFilesLines
* Display decimal defaults as strings to keep precisionJohn Gesimondo2015-06-231-1/+1
|
* Move non-type objects into the `Type::Helpers` namespaceSean Griffin2015-02-071-1/+1
| | | | | | | The type code is actually quite accessible, and I'm planning to encourage people to look at the files in the `type` folder to learn more about how it works. This will help reduce the noise from code that is less about type casting, and more about random AR nonsense.
* Correctly handle Float -> BigDecimal with unspecified precisionSean Griffin2014-12-221-1/+9
| | | | Fixes #18122
* Fix type casting to Decimal from Float with ...joker10072014-08-011-4/+17
| | | | | When I defines large precision column at RDBMS, I assigns float value, raise ArgumentError (precision too large).
* Prefer if/else for this caseRafael Mendonça França2014-07-171-3/+2
| | | | | One of the branches is using a proc to check if the value respond_to a method so it is better to not do case comparations
* Fix decimal_test module and add new test for object responding to to_dMariano Valles2014-07-161-1/+0
|
* Fix case statement to use ::Numeric and ::StringMariano Valles2014-07-161-1/+1
|
* Change class evaluation for Rationals in cast_valueMariano Valles2014-07-161-4/+6
|
* Fix rational to decimal on type_cast_from_userMariano Valles2014-07-161-1/+3
|
* Removed unused `klass` definitions from typesSean Griffin2014-06-061-4/+0
| | | | Only `Date` and `Time` are handled.
* refactor, introduce `Type#type_cast_for_schema` to cast for schema.rbYves Senn2014-05-301-0/+4
| | | | | | | This removes the case statement in `SchemaDumper` and gives every `Type` the possibility to control the SchemaDumper default value output. /cc @sgrif
* Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-0/+25
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`