aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* use _action callbacks in actionmailerFrancesco Rodriguez2012-12-081-5/+5
|
* add tests to aliased _filter callbacksFrancesco Rodriguez2012-12-071-0/+46
|
* use `_action` instead of `_filter` callbacksFrancesco Rodriguez2012-12-073-26/+24
|
* update documentation and code to use _action callbacksFrancesco Rodriguez2012-12-0711-18/+18
|
* Rename all action callbacks from *_filter to *_actionDavid Heinemeier Hansson2012-12-071-5/+5
|
* Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-071-10/+5
| | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-061-5/+10
| | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* Allow fragment cache to accept :if and :unless optionsFabrizio Regini2012-12-051-0/+64
| | | | [Stephen Ausman + Fabrizio Regini]
* Adding filter capability to ActionController logsFabrizio Regini2012-12-051-0/+22
|
* Fixed issue where routes with globs caused constraints on that glob toMaura Fitzgerald2012-12-041-0/+29
| | | | | | be ignored. A regular expression constraint gets overwritten when the routes.rb file is processed. Changed the overwriting to an ||= instead of an = assignment.
* Override <%== to always behave as literal text rather than toggling based on ↵Jeremy Kemper2012-12-032-4/+10
| | | | whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged.
* More descriptive error when rendering a partial with `:layout => true`Yves Senn2012-12-021-0/+5
|
* hash filters should be accessed with symbols or stringsFrancesco Rodriguez2012-11-301-0/+25
|
* Remove observers and sweepersRafael Mendonça França2012-11-283-58/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Merge pull request #8318 from Empact/fixture-fileRafael Mendonça França2012-11-271-0/+12
|\ | | | | Use File.join to better integrate fixture_path in fixture_file_upload.
| * Use File.join to better integrate fixture_path in fixture_file_upload.Ben Woosley2012-11-261-0/+12
| |
* | No sort Hash options in #grouped_options_for_selectSergey Kojin2012-11-271-1/+1
| |
* | Accept symbols as #send_data :disposition valueElia Schito2012-11-271-0/+12
| |
* | Improve clarity of routing testsAndrew White2012-11-261-634/+1081
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #8316 from roberto/assert_template_validate_optionsCarlos Antonio da Silva2012-11-261-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | assert_template: validating option keysRoberto Soares2012-11-251-0/+6
| | |
* | | Merge pull request #8317 from latortuga/cache-digest-opt-outDavid Heinemeier Hansson2012-11-262-0/+15
|\ \ \ | |/ / |/| | Add explicit opt-out for fragment cache digesting
| * | Add explicit opt-out for fragment cache digestingDrew Ulmer2012-11-252-0/+15
| |/ | | | | | | | | | | | | | | | | 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
* | `assert_template` fails with empty string.Roberto Soares2012-11-231-0/+7
| |
* | `assert_template` fails with empty string when a template has been renderedRoberto Soares2012-11-231-0/+7
|/ | | | | | | | For instance, it prevents false positive in this case: file = nil get :index assert_template("#{file}")
* Allow setting a symbol as path in scope on routesGuillermo Iguaran2012-11-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #8183 from jcoglan/objectless_sessionsJon Leighton2012-11-211-0/+21
|\ | | | | Store FlashHashes in the session as plain hashes
| * Store FlashHashes in the session as plain hashes rather than custom objects ↵James Coglan2012-11-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Correct the use of params options when given to url_forCarlos Antonio da Silva2012-11-191-9/+3
| | | | | | | | Merge url for tests and add changelog entry for #8233.
* | Fix issue with params in url_fortumayun2012-11-191-0/+8
| | | | | | | | | | | | With a "params" argument, the following error is raised: undefined method `reject!` for "":String
* | Refactor request tests, remove #with_set methodCarlos Antonio da Silva2012-11-191-8/+3
| |
* | render every partial with a new `PartialRenderer`.Yves Senn2012-11-191-0/+10
| | | | | | | | | | | | | | | | 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
* | Fix failing template testsCarlos Antonio da Silva2012-11-161-2/+2
| | | | | | | | Introduced in 4a4de567b45ff28035419bc2d92f9b206e3c0a66.
* | Introduce `ActionView::Template::Handlers::ERB.escape_whitelist`.Joost Baaij2012-11-161-1/+15
| | | | | | | | | | | | | | | | | | | | | | This is a list of mime types where template text is not html escaped by default. It prevents `Jack & Joe` from rendering as `Jack &amp; 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.
* | Remove extra whitespaceSantiago Pastorino2012-11-151-1/+1
| |
* | Merge pull request #8112 from rails/encrypted_cookiesSantiago Pastorino2012-11-154-11/+38
|\ \ | | | | | | Encrypted cookies
| * | Move ensure_secret_secure to DummyKeyGeneratorSantiago Pastorino2012-11-031-1/+1
| | |
| * | Allow users to change the default salt if they want, shouldn't be necessarySantiago Pastorino2012-11-031-1/+4
| | |
| * | Use derived keys everywhere, http_authentication was missing itSantiago Pastorino2012-11-031-1/+3
| | |
| * | Add cookie.encrypted which returns an EncryptedCookieJarSantiago Pastorino2012-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | How to use it? cookies.encrypted[:discount] = 45 => Set-Cookie: discount=ZS9ZZ1R4cG1pcUJ1bm80anhQang3dz09LS1mbDZDSU5scGdOT3ltQ2dTdlhSdWpRPT0%3D--ab54663c9f4e3bc340c790d6d2b71e92f5b60315; path=/ cookies.encrypted[:discount] => 45
| * | Sign cookies using key deriverSantiago Pastorino2012-11-033-9/+16
| |/
* | Merge pull request #8222 from marcandre/avoid_slashRafael Mendonça França2012-11-141-0/+5
|\ \ | | | | | | Avoid using Integer#/, as it is redefined by the 'mathn' stdlib
| * | Avoid using Integer#/, as it is redefined by the 'mathn' stdlibMarc-Andre Lafortune2012-11-141-0/+5
| | |
* | | start using options objectAaron Patterson2012-11-131-1/+1
| | |
* | | Ruby 2.0.0 defaults source encoding to utf-8 so we need to specifically tag ↵Aaron Patterson2012-11-121-0/+1
|/ / | | | | | | this file with us-ascii
* | Revert "Merge pull request #8017 from jcoglan/objectless_sessions"Jon Leighton2012-11-091-21/+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
* | Merge pull request #8017 from jcoglan/objectless_sessionsJon Leighton2012-11-081-0/+21
|\ \ | | | | | | Store FlashHashes in the session as plain hashes
| * | Store FlashHashes in the session as plain hashes rather than custom objects ↵James Coglan2012-11-031-0/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #8115 from senny/7842_handle_trailing_slash_with_enginesRafael Mendonça França2012-11-081-0/+5
|\ \ | | | | | | handle trailing slash with engines (test case for #7842)
| * | test case to lock down the behavior of #7842Yves Senn2012-11-041-0/+5
| |/