| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
This yields a small bit of performance improvement when building the
defaults from constraints, specially considering that it's rather common
for constraints to be empty.
Also, there's a bit of duplicated code in here that I have to check
before extracting.
|
| |
|
|
|
|
|
|
| |
Instead of iterating again over the options and setting one by one, we
can just merge the recover hash back to the scope one since all keys
match.
|
|
|
|
|
| |
Use the same :blocks key in the recover hash to revert the scope options
later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
| |
| |
| | |
you and shows the diff. Also delayed message calculation so the cost of the diff on success is now gone.
|
| |
| |
| |
| |
| | |
I suck at English, please help me reviewing this <3 <3 <3
[ci skip]
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
actionpack/lib/action_dispatch/routing/redirection.rb
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This allows easy upgrading from the old signed Cookie Store <= 3.2
or the deprecated one in 4.0 (the ones that doesn't use key derivation)
to the new one that signs using key derivation
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use if..else conditions instead of return guards.
Use _ for not used arguments when iterating.
Set the path variable directly instead of using an empty string and <<.
|
|\ \ \
| | | |
| | | | |
Encrypted cookies
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Developers must set config.secret_key_base in
config/initializers/secret_token.rb
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
How to use it?
cookies.encrypted[:discount] = 45
=> Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/
cookies.encrypted[:discount]
=> 45
|
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
get is the most common usage, and match without an explicit verb
was disallowed in 56cdc81c08b1847c5c1f699810a8c3b9ac3715a6.
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | | |
It's no longer used in Rails any more.
See https://github.com/rails/rails/pull/8142\#issuecomment-10227297 for more
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
not raise so many exceptions:
https://github.com/rails/rails/blob/master/actionpack/lib/action_view/template.rb#L126
irb(main):001:0> class Foo; def method_missing(*args); super; end end
=> nil
irb(main):002:0> $DEBUG = true
=> true
irb(main):003:0> Array(Foo.new)
Exception `NoMethodError' at (irb):1 - undefined method `to_ary' for #<Foo:0x007f854390e488>
Exception `NoMethodError' at (irb):1 - undefined method `to_a' for #<Foo:0x007f854390e488>
=> [#<Foo:0x007f854390e488>]
irb(main):004:0>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| |/ / |
|
|/ / |
|
|/ |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
actionpack/lib/action_controller/metal/mime_responds.rb
activerecord/lib/active_record/attribute_methods.rb
guides/source/working_with_javascript_in_rails.md
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
There is no need in additional `@calculated_ip` instance variable.
|
| |
| |
| |
| |
| |
| |
| | |
appends).
Now `BestStandardsSupport` middleware appends it's `X-UA-Compatible` value to app's value.
Also test for `BestStandardsSupport` middleware added.
|
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
|