- 20 2月, 2015 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
It is also necessary to format a time column like a datetime column.
-
由 Ryuta Kamizono 提交于
-
- 19 2月, 2015 4 次提交
-
-
由 Rafael Mendonça França 提交于
[ci skip]
-
由 Ryuta Kamizono 提交于
The cause by which the test suite for the mysql adapter broke in 1502caef (reverted 89ba5bb4) is because the precision was not extracted. The rounding problem in mysql adapter has not been fixed, but `mysql_56` helper tested only mysql2 adapter, its behavior was not apparent.
-
由 Ryuta Kamizono 提交于
-
由 Michael Ryan 提交于
-
- 18 2月, 2015 10 次提交
-
-
由 Hyonjee Joo 提交于
Fixes #18905. `#touch` now takes time as an option. Setting the option saves the record with the updated_at/on attributes set to the current time or the time specified. Updated tests and documentation accordingly.
-
由 Ryuta Kamizono 提交于
Lowercase raw SQL has been replaced by 07b659ca already. This commit replaces everything else of raw SQL.
-
由 Yves Senn 提交于
/cc @yahonda This makes it easier for third party adapters to run our tests, even if that database does not support IF EXISTS.
-
由 Sean Griffin 提交于
This helper no longer makes sense as a separate method. Instead I'll just have `deserialize` call `cast` by default. This led to a random infinite loop in the `JSON` pg type, when it called `super` from `deserialize`. Not really a great way to fix that other than not calling super, or continuing to have the separate method, which makes the public API differ from what we say it is.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
This reverts commit 1502caef. The test suite for the mysql adapter broke when this commit was used with MySQL 5.6. Conflicts: activerecord/CHANGELOG.md
-
- 17 2月, 2015 1 次提交
-
-
由 Vipul A M 提交于
Deprecated passing of `start` value to `find_in_batches` and `find_each` in favour of `begin_at` value.
-
- 16 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
As per previous discussions, we want to give users the ability to reference their own types with symbols, instead of having to pass the object manually. This adds the class that will be used to do so. ActiveRecord::Type.register(:money, MyMoneyType)
-
- 14 2月, 2015 6 次提交
-
-
由 Godfrey Chan 提交于
...so it doesn't look like you *have* to use SQL strings for that case (not anymore!). Would like to replace the SQL string example with something that you cannot do with the "normal" query API, but I could not come up with a short, realistic example. Suggestions welcome!
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
Using enum names in SQL strings doesn't actually work, the test was wrong (fixed in 3dfd1bab).
-
由 Godfrey Chan 提交于
Make sure we have coverage for both the find/build cases
-
由 Godfrey Chan 提交于
-
由 Godfrey Chan 提交于
Also updated the documentation about the new ability to query them normally, and added test to make sure they work!
-
- 13 2月, 2015 3 次提交
-
-
由 Wojciech Wnętrzak 提交于
``` user = User.create(token: "custom-secure-token") user.token # => "custom-secure-token" ```
-
由 Eugene Gilburg 提交于
Use SQL COUNT and LIMIT 1 queries for none? and one? methods if no block or limit is given, instead of loading the entire collection to memory. The any? and many? methods already follow this behavior. [Eugene Gilburg & Rafael Mendonça França]
-
由 Ryuta Kamizono 提交于
The datetime precision tests for any adapters is duplicated.
-
- 12 2月, 2015 7 次提交
-
-
由 Yves Senn 提交于
This finally removes the warning "WARNING: there is no transaction in progress" when running Active Record tests using PostgreSQL.
-
由 Yves Senn 提交于
Also removed some cruft in the `setup` and `teardown` methods.
-
由 Yves Senn 提交于
"active_support/testing/stream" is already required in `test_case.rb`. Furthermore the test "test/cases/migration_test.rb" could no longer be executed directly.
-
由 Ryuta Kamizono 提交于
-
由 Sean Griffin 提交于
In addition to cleaning up the implementation, this allows type casting behavior to be applied consistently everywhere. (#where for example). A good example of this was the previous need for handling value to key conversion in the setter, because the number had to be passed to `where` directly. This is no longer required, since we can just pass the string along to where. (It's left around for backwards compat) Fixes #18387
-
由 Sean Griffin 提交于
It looks like the only reason `current_scope` was thread local on `base_class` instead of `self` is to ensure that when we call a named scope created with a proc on the parent class, it correctly uses the default scope of the subclass. The reason this wasn't happening was because the proc captured `self` as the parent class, and we're not actually defining a real method. Using `instance_exec` fixes the problem. Fixes #18806
-
由 Sean Griffin 提交于
As far as I can tell, the original reason that this behavior was added has been sufficiently resolved elsewhere, as we no longer remove the encoding of strings coming out of the database.
-
- 11 2月, 2015 5 次提交
-
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
MySQL rejects to remove an index which is used in a foreign key constraint: ``` ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_copies_on_title_id': needed in a foreign key constraint: ALTER TABLE `copies` DROP `title_id` ``` Removing the constraint before removing the column (and the index) solves this problem.
-
由 Ryuta Kamizono 提交于
`precision: 0` was not dumped by f1a0fa9e. However, `precision: 0` is valid value for PostgreSQL timestamps.
-
由 Sean Griffin 提交于
The various databases don't actually need significantly different handling for this behavior, and they can achieve it without knowing about the type of the object. The old implementation was returning a string, which will cause problems such as breaking TZ aware attributes, and making it impossible for the adapters to supply their logic for time objects.
-