Godfrey Chan
ead947a3b2
Re-write legacy (marshal) cookies on read
2014-02-11 01:54:17 -08:00
Guillermo Iguaran
a668beffd6
Stringify the incoming hash in FlashHash
...
Stringify the incoming as well to handle incoming symbol keys from
marshalled sessions
2014-02-11 01:54:17 -08:00
Guillermo Iguaran
a6ce984b49
Convert FlashHash in a Hash with indifferent access
2014-02-11 01:54:17 -08:00
Godfrey Chan
ba6861d032
Changed the tests to ensure HybridSerializer actually migrates the cookies (currently failing)
2014-02-11 01:54:17 -08:00
Godfrey Chan
6de4888e04
Fixed minor typo in test code
2014-02-11 01:54:17 -08:00
Rafael Mendonça França
d4b7aa735a
Tests for the HybridSerializer
2014-02-11 01:54:17 -08:00
Godfrey Chan
25f68ac6a2
Removed an old test
2014-02-11 01:54:17 -08:00
Godfrey Chan
fafe8ece9d
Added HybridSerializer to upgrade existing marshal cookies (wip: need tests)
2014-02-11 01:54:16 -08:00
Godfrey Chan
54641fa2e3
Just very so slightly better test coverage
2014-02-11 01:54:16 -08:00
Godfrey Chan
b927d67dec
Renamed session_serializer option to cookies_serializer
2014-02-11 01:54:16 -08:00
Yves Senn
3b868cc99d
docs, link to HTTP and CGI header definitions. [ci skip]
...
This was a reaction to: https://github.com/rails/rails/pull/9700#issuecomment-34550210
2014-02-10 15:51:51 +01:00
Andrew White
462d7cb314
Set the :shallow_path as each scope is generated
...
If we set :shallow_path when shallow is called it can result in incorrect
paths if the resource is inside a namespace because namespace itself sets
the :shallow_path option to the namespace path.
We fix this by removing the :shallow_path option from shallow as that should
only be turning shallow routes on and not otherwise affecting the scope.
To do this we need to treat the :shallow option to resources differently to
other scope options and move it to before the nested block is called.
This change also has the positive side effect of making the behavior of the
:shallow option consistent with the shallow method.
Fixes #12498 .
2014-02-09 10:46:07 -08:00
Vijay Dev
92fdd65162
Merge branch 'master' of github.com:rails/docrails
...
Conflicts:
guides/source/active_record_validations.md
guides/source/api_documentation_guidelines.md
guides/source/configuring.md
2014-02-09 23:33:55 +05:30
Aaron Patterson
33be58b206
Merge pull request #13982 from dskang/fix-response-flatten-infinite-recursion
...
Fix response flatten infinite recursion
2014-02-09 08:50:28 -08:00
Rafael Mendonça França
a5ee843d91
Merge pull request #13990 from zzak/ap_dont_autoload_filter_parameters
...
FilterParameters is referenced at the class level from the Request
2014-02-09 11:58:10 -02:00
Carlos Antonio da Silva
e08514e822
Merge pull request #13985 from zzak/remove_old_todo_in_url_for_test
...
Remove outdated TODO from url_for test, this test was fixed in 900a2d30
2014-02-09 11:49:18 -02:00
Zachary Scott
8d7923b7eb
FilterParameters is referenced at the class level from the Request
...
Since it's already required in the file, we don't need to use autoload
too. This commit is symmetrical change to 0b10180 for Response.
2014-02-09 11:30:49 +02:00
SHIBATA Hiroshi
a09c07890a
use File.exist? instead of File.exists?
2014-02-09 17:39:55 +09:00
Dan Kang
069bc27385
Prevent [response].flatten from recursing infinitely.
...
Returning `self` from within the array returned by `to_ary`
caused this. Instead, we can just substitute another object.
It provides the `each` behavior required by the rack spec.
2014-02-08 23:22:04 -08:00
Zachary Scott
dfe9cf1ace
Remove outdated TODO from url_for test, this test was fixed in 900a2d30
2014-02-09 04:20:56 +02:00
Myron Marston
cbd10e27d1
Add missing test for response destructuring.
2014-02-08 17:40:28 -08:00
Mikko Johansson
ccd1c435ee
Skips tests on Windows that create files with illegal characters
2014-02-09 02:02:44 +02:00
Godfrey Chan
77577149f7
Updated the cookie docs to use the safer JSON.{generate,parse}
...
cc @senny
2014-02-08 10:00:09 -08:00
Robin Dupret
50d828c0af
Rely on backticks instead of tt tags [ci skip]
...
Since the language in code blocks is inferred, if the code contains tt
tags, the block will be parsed as XML for instance while it is Ruby.
2014-02-08 16:31:12 +01:00
Yves Senn
519deb6f50
docs, Cookie values are String based. Closes #12860 . [ci skip]
2014-02-08 13:42:44 +01:00
Philipe Fatio
47860b62b3
Require action_view to fix missing constant
...
Previously, requiring action_view/view_paths did cause an uninitialized
constant error for ENCODING_FLAG, which is defined in action_view.
2014-02-07 17:48:18 +01:00
Ionatan Wiznia
f8d740af93
Tests that skips a controller filters that was set up using a class
2014-02-06 20:11:40 +01:00
Yves Senn
580f0b61dc
synchronize 4.1 release notes with CHANGELOGS. [ci skip]
...
/cc @chancancode
2014-02-06 11:43:16 +01:00
Rafael Mendonça França
e9be1c1e80
Merge pull request #13863 from joshjordan/jsj-dont-throw-out-get-params
...
Do not discard query parameters on requests that use wrap_parameters
Conflicts:
actionpack/CHANGELOG.md
2014-02-01 15:53:27 -02:00
Aaron Patterson
e8fcd599ba
only ask for the location filters once
2014-01-31 12:00:54 -08:00
Aaron Patterson
0b10180444
FilterRedirect is referenced at the class level from the Response
...
We can just require the file rather than going through the autoload
indirection
2014-01-31 11:54:42 -08:00
Josh Jordan
1f9586fd47
Do not discard query parameters on requests that use wrap_parameters
2014-01-30 18:20:55 -05:00
Yves Senn
02f9f33142
tidy CHANGELOGs [ci skip]
2014-01-30 11:12:46 +01:00
Guillermo Iguaran
fd487860db
Modify the session serializer implementation
...
Rename allowed options to :marshal and :json, for custom serializers
only allow the use of custom classes.
2014-01-30 01:53:19 -05:00
Guillermo Iguaran
0f156100a2
Update CHANGELOG properly with GH #13692 [ci-skip]
2014-01-29 13:52:25 -05:00
Lukasz Sarnacki
b23ffd0dac
Allow session serializer key in config.session_store
...
MessageEncryptor has :serializer option, where any serializer object can
be passed. This commit make it possible to set this serializer from configuration
level.
There are predefined serializers (:marshal_serializer, :json_serialzier)
and custom serializer can be passed as String, Symbol (camelized and
constantized in ActionDispatch::Session namepspace) or serializer object.
Default :json_serializer was also added to generators to provide secure
defalt.
2014-01-29 17:05:00 +01:00
Aaron Patterson
f142527eb3
always use a block for cleanup / prepare callbacks so we can clean the method signature
2014-01-28 17:42:48 -08:00
Aaron Patterson
dd6488de51
scope is not necessary
2014-01-28 17:42:48 -08:00
Lukasz Sarnacki
69ab91ae93
Log which keys were set to nil in deep_munge
...
deep_munge solves CVE-2013-0155 security vulnerability, but its
behaviour is definately confuisng. This commit adds logging to deep_munge.
It logs keys for which values were set to nil.
Also mentions in guides were added.
2014-01-28 20:29:38 +01:00
Andrew White
3161606803
Clear filtered request attributes between requests in tests
...
The request attributes filtered_parameters, filtered_env and filtered_path
are memoized for performance reasons. However this can cause unusual
behavior in tests where there are multiple calls to get, post, etc.
Fixes #13803 .
2014-01-27 13:30:28 +00:00
Andrew White
a31a44a266
Add additional tests for #13824
2014-01-25 07:38:29 +00:00
Byron Bischoff
345555cd4c
Transform dashes to underscores in resource route names
...
Fixes #13824
2014-01-25 07:19:33 +00:00
Francesco Rodriguez
e2f3e0dc50
Remove unused argument.
2014-01-24 22:25:15 -03:00
Yves Senn
8efd5fec75
Merge pull request #13811 from mdesantis/issue-13810
...
Fixes #13810 `rake routes` error when mount `Rails::Engine` with empty routes
2014-01-24 04:34:22 -08:00
Maurizio De Santis
c1f8a0d614
Fix rake routes
error when Rails::Engine
with empty routes is mounted; fixes rails/rails#13810
...
Squash
2014-01-24 12:41:48 +01:00
Guillermo Iguaran
f1a0b15139
Merge pull request #13819 from arthurnn/one_require_test
...
unify param.require tests
2014-01-23 19:33:59 -08:00
Arthur Neves
aae53d2175
unify param.require tests
2014-01-23 22:28:24 -05:00
Arthur Neves
96dd3016d1
test boolean and number json param parsing
2014-01-23 21:56:28 -05:00
Andrew White
bf191318af
Tidy up tests and CHANGELOG for #12598
2014-01-20 16:34:22 +00:00
Mikko Johansson
f9f32e04ad
Automatically convert dashes to underscores in shorthand routes
2014-01-20 15:37:23 +00:00