aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/type
Commit message (Collapse)AuthorAgeFilesLines
* Reintroduce cache with testsSean Griffin2014-11-191-0/+32
|
* Add tests for `TypeMap#fetch` and push up to `TypeMap`Sean Griffin2014-11-191-0/+15
| | | | | | | It doesn't make sense for the subclass to implement this method, and not have it on the parent. We can also DRY up the implementation of `#lookup` to be defined in terms of fetch, which will give us a single point of entry
* That last test was incorrect... ☕Sean Griffin2014-11-191-10/+0
|
* Introduce test to demonstrate regression caused by da99a2a2Sean Griffin2014-11-191-0/+10
|
* Revert the behavior of booleans in string columns to that of 4.1Sean Griffin2014-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Why are people assigning booleans to string columns? >_> We unintentionally changed the behavior on Sqlite3 and PostgreSQL. Boolean values should cast to the database's representation of true and false. This is 't' and 'f' by default, and "1" and "0" on Mysql. The implementation to make the connection adapter specific behavior is hacky at best, and should be re-visted once we decide how we actually want to separate the concerns related to things that should change based on the database adapter. That said, this isn't something I'd expect to change based on my database adapter. We're storing a string, so the way the database represents a boolean should be irrelevant. It also seems strange for us to give booleans special behavior at all in string columns. Why is `to_s` not sufficient? It's inconsistent and confusing. Perhaps we should consider deprecating in the future. Fixes #17571
* Use the correct values for int max and minSean Griffin2014-10-311-0/+106
| | | | | We had accidentally gone one power of two too far. In addition, we need to handle minimum values as well as the maximum.
* Fix type casting to Decimal from Float with ...joker10072014-08-011-0/+5
| | | | | When I defines large precision column at RDBMS, I assigns float value, raise ArgumentError (precision too large).
* Fix decimal_test module and add new test for object responding to to_dMariano Valles2014-07-161-6/+15
|
* Fix case statement to use ::Numeric and ::StringMariano Valles2014-07-161-0/+24
|
* Detect in-place modifications on StringsSean Griffin2014-06-171-0/+36
|
* Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-0/+130
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`