| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
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}")
|
|\
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|\ \
| | |
| | | |
Encrypted cookies
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all the hash
params.require(:person).permit(:projects_attributes) was returning
=> {"projects_attributes"=>{"0"=>{"name"=>"Project 1"}}}
When should return
=> {}
You should be doing ...
params.require(:person).permit(projects_attributes: :name)
to get just the projects attributes you want to allow
|
|
|
|
|
|
|
|
|
|
|
| |
the documentation on #assert_template states that the :locals option is
only available in view test cases:
# In a view test case, you can also assert that specific locals are passed
# to partials:
I added a warning when it's passed in an inapropriate context to prevent
a NoMethodError.
|
|
|
|
|
|
|
| |
This will make easier to permit date/time attributes generated by
helpers like date_select.
[Sven Schwyn + Rafael Mendonça França]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
It's best to just return text/plain when something has gone terribly
wrong.
Fixes #5660.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given Im rendering an template `/layout/hello.html.erb`, assert_template was
passing with any string that matches. This behavior allowed false passing like:
assert_template "layout"
assert_template "out/hello"
Now the passing possibilities are:
assert_template "layout/hello"
assert_template "hello"
fixing assert_template bug when template matches expected, but not ends with
Cherry Pick Merge: Fixes issue #3849 assert_template false positive
taking redundant test off
prevening incorrect assert_template when rendering with repeated names in path
updating CHANGELOG with bugfix: assert_template false passing
|
| |
|
|
|
|
|
| |
actionpack/test/template/spec_type_test.rb:32: warning: method redefined; discarding old test_spec_type_wont_match_non_space_characters
actionpack/test/controller/spec_type_test.rb:30: warning: previous definition of test_spec_type_wont_match_non_space_characters was here
|
|
|
|
|
| |
Allow controller tests using the spec DSL to match strings.
Add test coverage for the register_spec_type calls.
|
|
|
|
| |
Add tests for controller tests using the minitest spec DSL.
|
|
|
| |
* The params as supplied pass born in authors[0] but not authors[1] so it seems like the test isn't covering what it should be covering.
|
|\
| |
| | |
Integrate strong_parameters in Rails 4
|
| | |
|
| |
| |
| |
| | |
StrongParameters protection
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
AC::Metal::ParamsWrapper
|
| | |
|