| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the routes for each test inside the test method so that
it's easier to see which routes are applicable to which test.
To ensure that each test wasn't invalidated the changes were
done by first removing all of the routes, ensuring that all
of the tests failed and then adding the routes back to each
test one by one. One test for `assert_recognizes` was
removed as it wasn't actually testing the defined routes and
is now tested more thoroughly in routing_assertions_test.rb.
One downside is that the test suite takes about 1s longer
due to having to using `method_missing` for handling the url
helpers as using `include url_helpers` isn't isolated
for each test.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
assert_template: validating option keys
It only handles the keys locals, partial, layout and count.
assert_template(foo: "bar") # raises ArgumentError
assert_template(leiaute: "test") # raises ArgumentError
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Add explicit opt-out for fragment cache digesting
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This add support for sending an explicit opt-out of the "Russian-doll"
cache digest feature on a case-by-case basis. This is useful when cache-
expiration needs to be performed manually and it would be otherwise
difficult to know the exact name of a digested cache key.
More information: https://github.com/rails/cache_digests/pull/16
|
| | |
|
|/
|
|
|
|
|
|
| |
For instance, it prevents false positive in this case:
file = nil
get :index
assert_template("#{file}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was surprising found that this example doesn't work:
scope :api do
resources :users
end
and the right form to use it is:
scope 'api' do
resources :users
end
I think this should work similary as `namespace` where both are allowed.
These two are equivalent:
namespace :api do
resources :users
end
namespace 'api' do
resources :user
end
|
|\
| |
| | |
Store FlashHashes in the session as plain hashes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
with unstable class names and instance variables.
Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
Remove blank lines I introduced in controller/test_case.rb.
Unit tests for FlashHash#to_session_value.
Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
Test that Rails 3.2 session flashes are correctly converted to the new format.
Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
|
| |
| |
| |
| | |
Merge url for tests and add changelog entry for #8233.
|
| |
| |
| |
| |
| |
| | |
With a "params" argument, the following error is raised:
undefined method `reject!` for "":String
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This resolves issues when rendering nested partials.
Previously the `PartialRenderer` was reused which led to
situations where the state of the renderer was reset.
Closes #8197
|
| |
| |
| |
| | |
Introduced in 4a4de567b45ff28035419bc2d92f9b206e3c0a66.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a list of mime types where template text is not html escaped
by default. It prevents `Jack & Joe` from rendering as
`Jack & Joe` for the whitelisted mime types. The default whitelist
contains text/plain.
This follows a whitelist approach where plain text templates are
not escaped, and all the others (json, xml) are. The mime type is
assumed to be set by the abstract controller.
|
| | |
|
|\ \
| | |
| | | |
Encrypted cookies
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
How to use it?
cookies.encrypted[:discount] = 45
=> Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/
cookies.encrypted[:discount]
=> 45
|
| |/ |
|
|\ \
| | |
| | | |
Avoid using Integer#/, as it is redefined by the 'mathn' stdlib
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
this file with us-ascii
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 36376560fdd02f955ae3bf6b7792b784443660ad, reversing
changes made to 3148ed9a4bb7efef30b846dc945d73ceebcc3f0f.
Conflicts:
actionpack/lib/action_dispatch/middleware/flash.rb
Reason: it broke Sam's CI
https://github.com/rails/rails/pull/8017#issuecomment-10210655
|
|\ \
| | |
| | | |
Store FlashHashes in the session as plain hashes
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
with unstable class names and instance variables.
Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
Remove blank lines I introduced in controller/test_case.rb.
Unit tests for FlashHash#to_session_value.
Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
Test that Rails 3.2 session flashes are correctly converted to the new format.
Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
|
|\ \
| | |
| | | |
handle trailing slash with engines (test case for #7842)
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
When you have an explicit index set, then when you build an input tag
with :multiple => true, it doesn't add [] to the end of its name, although
it should.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit f4ad0ebe7a6b17658bddfeb996e3c34835b75623, reversing
changes made to 8b2cbb3a832101f0e672ee309beca0f8c555b292.
Conflicts:
actionpack/CHANGELOG.md
REASON: This added introduced a bug when you have a shorthand route
inside a nested namespace.
See
https://github.com/rafaelfranca/rails/commit/281367eb770faf8077c1fd6194188e92ed1637a1
|
|
|
|
|
|
|
| |
appends).
Now `BestStandardsSupport` middleware appends it's `X-UA-Compatible` value to app's value.
Also test for `BestStandardsSupport` middleware added.
|
|
|
|
| |
Closes #8091
|
| |
|
| |
|
|
|
|
| |
This reverts commit a8560fa361958b33d76e4468eb5c07d82a20196e.
|
|
|
|
|
|
|
|
|
|
| |
If a unknown format is passed in a request, the methods html?, xml?, json? ...etc
Nil Exception.
This patch add a class NullMimeTypeObject, that is returned when request.format is unknown
and it responds false to the methods that ends with '?'.
It refers to #7837, not fixes because it's not considered a improvement not a bug.
|
| |
|
|
|
|
|
|
| |
button_to_function
Point the the Unobtrusive JavaScript secion in the JavaScript guide
|
| |
|
| |
|