- 22 2月, 2016 2 次提交
- 20 2月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Having collection caching that wraps templates and automatically tries to infer if they are cachable proved to be too much of a hassle. We'd rather have it be something you explicitly turn on. This removes much of the code and docs to explain the previous automatic behavior. This change also removes scoped cache keys and passing cache_options.
-
- 19 2月, 2016 4 次提交
-
-
由 Benjamin Quorning 提交于
-
由 Benjamin Quorning 提交于
Creating a protected getter method for `@parameters`.
-
由 Benjamin Quorning 提交于
-
由 Jon Moss 提交于
-
- 18 2月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
While iterating an AC::Parameters object, the object will mutate itself and stick AC::Parameters objects where there used to be hashes: https://github.com/rails/rails/blob/f57092ad728fa1de06c4f5fd9d09dcc2c4738fd9/actionpack/lib/action_controller/metal/strong_parameters.rb#L632 If you use `permit` after this iteration, the `fields_for_style` method wouldn't return true because the child objects are now AC::Parameters objects rather than Hashes. fixes #23701
-
- 17 2月, 2016 1 次提交
-
-
由 Benjamin Quorning 提交于
Now that AC::Parameters is no longer a Hash, it shouldn't look like a hash.
-
- 16 2月, 2016 2 次提交
-
-
由 Andrew White 提交于
-
由 Andrew White 提交于
The `cookies` hash isn't updated with the value generated by the output from `to_header` so it wasn't testing anything. Rendering the cookie value in the controller makes sure that the escaping is actually working.
-
- 15 2月, 2016 2 次提交
-
-
由 Abhishek Jain 提交于
-
由 Ryuta Kamizono 提交于
`NEVER_UNPERMITTED_PARAMS` is deprecated in Rails 4.2. See #15933.
-
- 13 2月, 2016 3 次提交
-
-
由 Kasper Timm Hansen 提交于
A callable cache key writes to the collection cache under a certain namespace. Which means if we don't have scoped cache key we can just rely on the `cache model_name do` in the templates to cache them. Less writes, more sharing. Add `assert_customer_cached` to better illustrate this in tests, and remove tests which then don't communicate as much.
-
由 Kasper Timm Hansen 提交于
It was difficult to see when the partials were rendered, and how many times we expected it to be rendered before. Because we weren't explaining it.
-
由 Kasper Timm Hansen 提交于
When people pass `cache: -> item { item.upcase }` they scope the collection cache keys so the individual partial cache isn't reused. Test that behavior.
-
- 12 2月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
We're not guaranteed to have a `RequestEncoder` to assign on `get` requests because we aren't extracting the parser from the response content type. Until now.
-
- 11 2月, 2016 1 次提交
-
-
由 Kasper Timm Hansen 提交于
When testing: ```ruby post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json ``` It's common to want to make assertions on the response body. Perhaps the server responded with JSON, so you write `JSON.parse(response.body)`. But that gets tedious real quick. Instead add `parsed_body` which will automatically parse the reponse body as what the last request was encoded `as`.
-
- 06 2月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
Tests can (and do) access the database from the main thread. In this case they were starting a transaction, then making a request. The request would create a new thread, which would allocate a new database connection. Since the main thread started a transaction that contains data that the new thread wants to see, the new thread would not see it due to data visibility from transactions. Spawning the new thread in production is fine because middleware should not be doing database manipulation similar to the test harness. Before 603fe20c it was possible to set the database connection id based on a thread local, but 603fe20c changes the connection lookup code to never look at the "connection id" but only at the thread object itself. Without that indirection, we can't force threads to use the same connection pool as another thread. Fixes #23483
-
- 30 1月, 2016 2 次提交
-
-
由 eileencodes 提交于
There are some cases when the `body` in `response_body=` can be set to nil. One of those cases is in `actionpack-action_caching` which I found while upgrading it for Rails 5. It's not possible to run `body.each` on a `nil` body so we have to return after we run `response.reset_body!`.
-
由 yuuji.yaginuma 提交于
This removes the following warning. ``` rails/actionpack/test/controller/render_test.rb:278: warning: assigned but unused variable - response ```
-
- 29 1月, 2016 2 次提交
-
-
由 eileencodes 提交于
This works on OSX but for some reason travis is throwing a ``` 1) Error: ExpiresInRenderTest#test_dynamic_render_with_absolute_path: NoMethodError: undefined method `unlink' for nil:NilClass ``` Looking at other tests in Railties the file has a name and we close it before unlinking, so I'm going to try that.
-
由 eileencodes 提交于
Test that we are not allowing you to grab a file with an absolute path outside of your application directory. This is dangerous because it could be used to retrieve files from the server like `/etc/passwd`.
-
- 27 1月, 2016 4 次提交
-
-
由 Akira Matsuda 提交于
[ci skip]
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
The cache for `render file:` seems to also be used in the case of `render(string)`. If one is supposed to be a hit and the other is supposed to be a miss, and they both reference the same file, then the cache could return incorrect values. This commit clears the cache between runs so that we get non-cached behavior.
-
- 23 1月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
CVE-2016-0752
-
- 22 1月, 2016 2 次提交
-
-
由 Jon Moss 提交于
See bug #21032.
-
由 Vipul A M 提交于
- Fix warning introduced in https://github.com/vipulnsward/rails/commit/77acc004efad07dfd4d4f83be14ef897968a3fd9 when fixing API responses. - render :text is deprecated, so added an assertion for it.
-
- 21 1月, 2016 1 次提交
-
-
由 Jon Moss 提交于
- Fixes bug #23142. - Bug was occurring only with ActionController::API, because `_process_options` wasn't being run for API requests, even though it was being run for normal app requests.
-
- 20 1月, 2016 4 次提交
-
-
由 eileencodes 提交于
This reverts commit 5d1b7c3b. The change here didn't actually fix the issue it was trying to fix, and this isn't the correct way to fix either issue. The problem is switching from the builder to grouping with find_all/regex is now very dependent on how you structure your path pattern.
-
由 abhishek 提交于
Response etags to always be weak: Prefixed W/ to value returned by ActionDispatch::Http::Cache::Response#etag= such that etags set in fresh_when and stale? are weak. For #17556.
-
由 schneems 提交于
It's reasonable to expose different value readers.
-
由 schneems 提交于
We can provide a more flexible upgrade experience by warning users they are using unsafe methods instead of forcing the safe API by deprecating before removal. This PR provides this functionality.
-
- 17 1月, 2016 1 次提交
-
-
由 eileencodes 提交于
In commit d993cb36 `build_path` was changed from using `grep` to `find_all` to save array allocations. This change was a little too aggressive in that when the dash comes before the symbol like `/omg-:song` the symbol is skipped. Removing the check for `n.right.left.literal?` fixes this issue, but does add back some allocations. The number of allocations are still well less than before. I've added a regression test to test this behavior for the future. Fixes #23069. Array allocations as of d993cb36: ``` {:T_SYMBOL=>11} {:T_REGEXP=>17} {:T_STRUCT=>6500} {:T_MATCH=>12004} {:T_OBJECT=>91009} {:T_DATA=>100088} {:T_HASH=>114013} {:T_STRING=>159637} {:T_ARRAY=>321056} {:T_IMEMO=>351133} ``` Array allocations after this change: ``` {:T_SYMBOL=>11} {:T_REGEXP=>1017} {:T_STRUCT=>6500} {:T_MATCH=>12004} {:T_DATA=>84092} {:T_OBJECT=>87009} {:T_HASH=>110015} {:T_STRING=>166152} {:T_ARRAY=>322056} {:T_NODE=>343558} ```
-
- 13 1月, 2016 1 次提交
-
-
由 claudiob 提交于
Fixes #23026 See discussion at #23026
-
- 09 1月, 2016 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 05 1月, 2016 2 次提交
-
-
由 Kasper Timm Hansen 提交于
Turns ``` post articles_path(format: :json), params: { article: { name: 'Ahoy!' } }.to_json, headers: { 'Content-Type' => 'application/json' } ``` into ``` post articles_path, params: { article: { name: 'Ahoy!' } }, as: :json ```
-
由 Ben Toews 提交于
-