Carlos Antonio da Silva
68f69ec31e
Move AS changelog entry to the top, improve AP changelog a bit
...
[ci skip]
2013-01-28 19:40:18 -02:00
Michiel Sikkes
489138802c
Added a Changelog entry for fixing HEAD requests.
2013-01-28 21:29:21 +01:00
Michiel Sikkes
f7277d99bf
Make current_url? work with a HEAD method
...
ActionDispatch::Head was removed in favor of Rack::Head. But Rack::Head
does not convert GET requests to HEAD requests so we need to do
checking for HEAD requests ourselves.
2013-01-28 21:18:57 +01:00
Michiel Sikkes
c4bc360e4e
Remove caching_allowed? from ActionController::Caching
...
Where is this used? No other code references to this method and it
isn't being tested anywhere. No tests fail when commented out.
2013-01-28 21:17:48 +01:00
Santiago Pastorino
5f5a43e2f7
Merge pull request #9032 from firmhouse/head-breaks-csrf
...
Make HEAD work / convert to GET once more
2013-01-28 07:25:20 -08:00
Akira Matsuda
5f30b547c8
Use Encoding::UTF_8 constant 🚯
2013-01-28 17:06:02 +09:00
Akira Matsuda
59deaecc76
Use already defined Encoding constants rather than creating one-trip Strings
2013-01-28 15:23:31 +09:00
Aaron Patterson
789df3be3e
add fetch to CookieJar
2013-01-27 14:17:56 -08:00
Xavier Noria
0b5d3f3273
Merge remote-tracking branch 'docrails/master'
...
Conflicts:
actionpack/lib/action_view/helpers/form_options_helper.rb
guides/code/getting_started/app/controllers/comments_controller.rb
2013-01-26 17:41:56 +01:00
Xavier Noria
4313461587
generic pass before merging docrails
2013-01-26 17:36:38 +01:00
Akira Matsuda
fb2ecaad6c
✂️ "raise" duplication
2013-01-26 12:25:42 +09:00
Carlos Antonio da Silva
9df25844ba
Add keys/values methods to TestSession
...
Bring back the same API we have with Request::Session.
2013-01-25 19:15:32 -02:00
Carlos Antonio da Silva
7d624e0e8c
Integrate Action Pack with Rack 1.5
...
All ActionPack and Railties tests are passing. Closes #8891 .
[Carlos Antonio da Silva + Santiago Pastorino]
2013-01-25 17:28:41 -02:00
Aaron Patterson
ccaeb6b667
use the helpers list rather than getting the methods from the module
2013-01-24 15:43:08 -08:00
Aaron Patterson
06573a3a76
module_eval is not necessary here
2013-01-24 15:33:08 -08:00
Aaron Patterson
345fc3badb
don't need to eval everything
2013-01-24 15:24:07 -08:00
Akira Matsuda + Koichi Sasada
b7b27fc2a3
Set Thread.abort_on_exception for the whole AS, AP, and AR tests
...
this would give us some more clues in case a test silently dies inside Thread
2013-01-24 20:00:45 +09:00
Xavier Noria
8ac94d7c89
ActionDispatch::Http::UploadedFile is a permitted scalar [ Closes #9051 ]
2013-01-23 23:15:26 +01:00
Michiel Sikkes
2ef138f0d4
Added request.head? to forgery protection code
2013-01-22 22:01:57 +01:00
Michiel Sikkes
64245e02e3
Added a test that shows that a HEAD request does not normally pass CSRF protection
2013-01-22 21:05:22 +01:00
Rafael Mendonça França
cb56c39b51
Lets kepp using Ruby 1.9 syntax
2013-01-22 10:40:33 -02:00
Rafael Mendonça França
16e0c8816c
Only check for unpermmited parameters if
...
action_on_unpermitted_parameters is present
2013-01-22 10:38:03 -02:00
Xavier Noria
2d9c4017dd
avoid creating an object in every call
...
This was a suggestion of @carlosantoniodasilva, thanks!
2013-01-22 11:18:41 +01:00
Carlos Antonio da Silva
bf112e551b
Remove tabs, use spaces ✂️
...
[ci skip]
2013-01-22 00:35:33 -02:00
Akira Matsuda
1e8d5e62c6
Merge branch 'isolating_tests'
...
Now we're almost ready to remove this: https://github.com/rails/rails/blob/5294ad8/activesupport/lib/active_support/test_case.rb#L29
2013-01-22 10:27:12 +09:00
Akira Matsuda
9b520d31e5
Restore I18n.locale after running tests
2013-01-22 10:26:44 +09:00
Rafael Mendonça França
5e4fb4da83
Stylistic pass at form_helper_test
2013-01-21 23:01:09 -02:00
José Mota
ee82ce7829
Capture block so content won't leak.
...
The [following pull request](https://github.com/rails/rails/pull/8916 ) fixed
the block being passed to the appropriate helper method. However, the content
being passed into the block is generating repeated markup on the page due to
some weird ERb evaluation.
This commit tries to capture the block's generated output so the page isn't
flooded with markup.
[Rafael França + José Mota]
Closes #8936
2013-01-21 22:02:02 -02:00
Piotr Sarnacki
351b0d9092
Update actionpack's CHANGELOG for 445f14e
2013-01-21 21:53:06 +01:00
Akira Matsuda
d1c02a7fc2
Make sure to reset default_url_options
2013-01-22 05:24:23 +09:00
Piotr Sarnacki
445f14e975
Fix asset_path in mounted engine
...
Historically serving assets from a mountable engine could be achieved by
running ActionDispatch::Static as a part of engine middleware stack or
to copy assets prefixed with an engine name. After introduction of
assets pipeline this is not needed as all of the assets are served or
compiled into main application's assets.
This commit removes the obsolete line making asset_path always generate
paths relative to the root or config.relative_url_root if it's set.
(closes #8119 )
2013-01-21 21:21:39 +01:00
Andrew White
c4106d0c08
Duplicate possible frozen string from route
...
Ruby 1.9 freezes Hash string keys by default so where a route is
defined like this:
get 'search' => 'search'
then the Mapper will derive the action from the key. This blows up
later when the action is added to the parameters hash and the
encoding is forced.
Closes #3429
2013-01-21 17:14:10 +00:00
Rafael Mendonça França
c6a39c01f7
Merge pull request #9014 from virusman/form_helpers_ar_tests
...
AR integration tests for form helpers
2013-01-21 05:52:42 -08:00
virusman
9047ca019a
Added AR integration tests for form helpers
2013-01-21 17:09:12 +04:00
Rafael Mendonça França
68a6fb6953
Merge pull request #9001 from schneems/schneems/routes-path-js
...
In Browser Path Matching with Javascript
2013-01-21 04:06:31 -08:00
Carlos Antonio da Silva
57b65ef416
Fix setting expected value in translation tests
...
It was being set to nil instead due to the wrong assignment.
2013-01-21 09:29:03 -02:00
schneems
8b72d689e3
In Browser Path Matching with Javascript
...
When debugging routes ,it can sometimes be difficult to understand exactly how the paths are matched. This PR adds a JS based path matching widget to the `/rails/info/routes` output. You can enter in a path, and it will tell you which of the routes that path matches, while preserving order (top match wins).
The matching widget in action:
![](http://f.cl.ly/items/3A2F0v2m3m1Z1p3P3O3k/path-match.gif )
Prior to this PR the only way to check matching paths is via mental math, or typing in a path in the url bar and seeing where it goes. This feature will be an invaluable debugging tool by dramatically decreasing the time needed to check a path match.
ATP actionpack
2013-01-20 23:10:24 -06:00
Rafael Mendonça França
e4dbfce1c3
Merge pull request #9007 from dpree/master
...
Enhanced tests for AbstractController::Translation module
2013-01-20 20:26:17 -08:00
Carlos Antonio da Silva
2061c98b42
Review #translate docs [ci skip]
2013-01-20 22:49:42 -02:00
Carlos Antonio da Silva
9a7411a92b
Refactor grep call to remove .each
...
Grep already yields the matching keys to the given block.
2013-01-20 22:09:32 -02:00
Carlos Antonio da Silva
e0cc7ab3ff
Add missing assert calls
2013-01-20 22:03:31 -02:00
Carlos Antonio da Silva
5a69fe724e
Use 1.9 hash style in docs/comments [ci skip]
2013-01-20 22:03:25 -02:00
Carlos Antonio da Silva
f12f08d61f
Fix markdown formatting to highlight block in changelog [ci skip]
2013-01-20 21:45:05 -02:00
Jens Bissinger
37d15d4e1b
Add documentation for abstract controller #translate and #localize method.
2013-01-20 19:15:15 +01:00
Matthew Stopa
56498b4b9e
Add documentation to ActionDispatch::Response
2013-01-20 10:41:02 -07:00
Arun Agrawal
53ea940c5b
Removing warning: shadowing outer local variable
2013-01-20 23:02:02 +05:30
Xavier Noria
cbec22ce57
strong parameters filters permitted scalars
2013-01-20 17:59:53 +01:00
Jens Bissinger
4685d75736
Removed ActionController::Base dependency from abstract controller translation tests.
2013-01-20 15:53:43 +01:00
Jens Bissinger
1de60c54d3
Test abstract controller's localize method.
2013-01-20 15:44:03 +01:00
Aaron Patterson
b718998f3e
Merge pull request #8978 from chrismcg/remove_i18n_symbol_dependency
...
Remove i18n symbol dependency
2013-01-19 11:20:50 -08:00