- 14 2月, 2015 8 次提交
-
-
由 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 提交于
The previous edit kind of de-emphasized that, so changing it to be more explict. (It also avoids showing it as if it's a string-keyed hash.)
-
由 Godfrey Chan 提交于
Also updated the documentation about the new ability to query them normally, and added test to make sure they work!
-
由 Arthur Neves 提交于
-
- 13 2月, 2015 25 次提交
-
-
由 Rafael Mendonça França 提交于
Allow symbol as values for `tokenizer` of `LengthValidator`
-
由 Kasper Timm Hansen 提交于
Correct module name in deprecation message.
-
由 Guo Xiang Tan 提交于
-
由 Kasper Timm Hansen 提交于
Improve deprecation warning message
-
由 Yves Senn 提交于
`has_secure_token` hasen't been released yet. No need to track every change in the CHANGELOG.
-
由 Yves Senn 提交于
Do not overwrite secret token value when already present.
-
由 Yves Senn 提交于
[ci skip] escape under score
-
由 Guo Xiang Tan 提交于
-
由 Guo Xiang Tan 提交于
-
由 yui-knk 提交于
-
由 Arthur Nogueira Neves 提交于
require rack/utils in exception_wrapper
-
由 Andrew Lazarus 提交于
-
由 Wojciech Wnętrzak 提交于
``` user = User.create(token: "custom-secure-token") user.token # => "custom-secure-token" ```
-
由 Aaron Patterson 提交于
there's really no benefit here. It's the same number of lines without the meta programming and is faster
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
now we don't have to call reset! everywhere
-
由 Aaron Patterson 提交于
-
由 eileencodes 提交于
We shouldn't cache if it's not absolutely necessary. Removes route caching and instead skips using the `url_helpers` is the integration test session doesn't require it. Benchmark ips on integration and controller index method tests below. Without any caching or changes to `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 71.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 728.878 (± 8.0%) i/s - 3.692k INDEX: Functional Test 1.015k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1015.4 i/s INDEX: Integration Test: 728.9 i/s - 1.39x slower ``` With caching on `#url_helpers`: ``` Calculating ------------------------------------- INDEX: Integration Test 74.000 i/100ms INDEX: Functional Test 99.000 i/100ms ------------------------------------------------- INDEX: Integration Test 752.377 (± 6.9%) i/s - 3.774k INDEX: Functional Test 1.021k (± 6.7%) i/s - 5.148k Comparison: INDEX: Functional Test: 1021.1 i/s INDEX: Integration Test: 752.4 i/s - 1.36x slower ``` Afer removing the caching and bypassing the `url_helpers` when not necessary in the session: ``` Calculating ------------------------------------- INDEX: Integration Test 87.000 i/100ms INDEX: Functional Test 97.000 i/100ms ------------------------------------------------- INDEX: Integration Test 828.433 (± 6.4%) i/s - 4.176k INDEX: Functional Test 926.763 (± 7.2%) i/s - 4.656k Comparison: INDEX: Functional Test: 926.8 i/s INDEX: Integration Test: 828.4 i/s - 1.12x slower ```
-
由 Rafael Mendonça França 提交于
Extract `DateTimePrecisionTest`
-
由 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.
-
由 Zachary Scott 提交于
Add tip for skipping `partial` and `locals` options for `render`
-
由 Rafael Mendonça França 提交于
ActionController#translate supports symbols
-
由 Rafael Mendonça França 提交于
Allow `:precision` option for time type columns
-
由 Rafael Mendonça França 提交于
remove unnecessary assignment/parameter passing in AS::Callbacks...::Around (master branch)
-
- 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.
-
由 Kasper Timm Hansen 提交于
fix typo in fresh_when example [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Yves Senn 提交于
Schema creation doesn't load the app
-
由 Godfrey Chan 提交于
`coder.represent_scalar` means something along the lines of "Here is a quoted string, you can just add it to the output", which is not the case here. It only works for simple strings that can appear unquoted in YAML, but causes problems for e.g. primitive-like strings ("1", "true"). `coder.represent_object` on the other hand, means that "This is the Ruby-object representation for this thing suitable for use in YAML dumping", which is what we want here. Before: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => true YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => false YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => 1 YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => 1.1 After: YAML.load ActiveSupport::SafeBuffer.new("Hello").to_yaml # => "Hello" YAML.load ActiveSupport::SafeBuffer.new("true").to_yaml # => "true" YAML.load ActiveSupport::SafeBuffer.new("false").to_yaml # => "false" YAML.load ActiveSupport::SafeBuffer.new("1").to_yaml # => "1" YAML.load ActiveSupport::SafeBuffer.new("1.1").to_yaml # => "1.1" If we ever want Ruby to behave more like PHP or JavaScript though, this is an excellent trick to use ;)
-