aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* handle protocol option in stylesheet_link_tag and javascript_include_tagVasiliy Ermolovich2012-12-181-1/+23
| | | | closes #8388
* Merge pull request #8497 from acapilleri/conditional_cacheRafael Mendonça França2012-12-141-16/+16
|\ | | | | | | Removed :if / :unless conditions to fragment cache in favour of *cache_i...
| * Removed :if and :unless from fragment cache option in favour ofAngelo capilleri2012-12-141-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cache_if(condition, option, &block) and cache_unless(condition, option, &block). In the PR #8371 was introduced conditional options :if and :unless in the cache method. Example: <%= cache @model, if: some_condition(@model) do %> ... <%end%> This is a good feature but *cache_if* and and *cache_unless* are more concise and close to the standard of rails view helpers (ex: link_to_if and link_to_unless). Example: <%= cache_if condition, @model do %> ... <%end%>
* | Clear url helper methods when routes are reloadedAndrew White2012-12-141-0/+86
|/ | | | | Remove all the old url helper methods when clear! is called on the route set because it's possible that some routes have been removed.
* Fix rewinding in ActionDispatch::Request#raw_postMatt Venables2012-12-111-0/+7
| | | | | | | | | If env['RAW_POST_DATA'] is nil, #raw_post will attempt to set it to the result of #body (which will return env['rack.input'] if env['RAW_POST_DATA'] is nil). #raw_post will then attempt to rewind the result of another call to #body. Since env['RAW_POST_DATA'] has already been set, the result of #body is not env['rack.input'] anymore. This causes env['rack.input'] to never be rewound.
* Merge pull request #8476 from sheerun/fix/multipart-getRafael Mendonça França2012-12-101-0/+12
|\ | | | | Prevent raising EOFError on multipart GET request.
| * Prevent raising EOFError on multipart GET request.Adam Stankiewicz2012-12-101-0/+12
| | | | | | | | | | | | | | | | | | | | Such request can happen on Internet Explorer. When we redirect after multipart form submission, the request type is changed to GET, but Content-Type is preserved as multipart. GET request cannot have multipart body and that caused Rails to fail. It's similar fix to Rack's one: https://github.com/chneukirchen/rack/blob/8025a4ae9477d1e6231344c2b7d795aa9b3717b6/lib/rack/request.rb#L224
* | 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
| | |