actionpack 3.2.22.5 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +641 -418
- data/MIT-LICENSE +1 -1
- data/README.rdoc +5 -288
- data/lib/abstract_controller.rb +1 -8
- data/lib/abstract_controller/asset_paths.rb +2 -2
- data/lib/abstract_controller/base.rb +39 -37
- data/lib/abstract_controller/callbacks.rb +101 -82
- data/lib/abstract_controller/collector.rb +7 -3
- data/lib/abstract_controller/helpers.rb +23 -11
- data/lib/abstract_controller/layouts.rb +68 -73
- data/lib/abstract_controller/logger.rb +1 -2
- data/lib/abstract_controller/rendering.rb +22 -13
- data/lib/abstract_controller/translation.rb +16 -1
- data/lib/abstract_controller/url_for.rb +6 -6
- data/lib/abstract_controller/view_paths.rb +1 -1
- data/lib/action_controller.rb +15 -6
- data/lib/action_controller/base.rb +46 -22
- data/lib/action_controller/caching.rb +46 -33
- data/lib/action_controller/caching/fragments.rb +23 -53
- data/lib/action_controller/deprecated.rb +5 -1
- data/lib/action_controller/deprecated/integration_test.rb +3 -0
- data/lib/action_controller/log_subscriber.rb +11 -8
- data/lib/action_controller/metal.rb +16 -30
- data/lib/action_controller/metal/conditional_get.rb +76 -32
- data/lib/action_controller/metal/data_streaming.rb +20 -26
- data/lib/action_controller/metal/exceptions.rb +19 -6
- data/lib/action_controller/metal/flash.rb +24 -9
- data/lib/action_controller/metal/force_ssl.rb +32 -9
- data/lib/action_controller/metal/head.rb +25 -4
- data/lib/action_controller/metal/helpers.rb +6 -9
- data/lib/action_controller/metal/hide_actions.rb +1 -2
- data/lib/action_controller/metal/http_authentication.rb +105 -87
- data/lib/action_controller/metal/implicit_render.rb +1 -1
- data/lib/action_controller/metal/instrumentation.rb +2 -1
- data/lib/action_controller/metal/live.rb +141 -0
- data/lib/action_controller/metal/mime_responds.rb +161 -47
- data/lib/action_controller/metal/params_wrapper.rb +112 -74
- data/lib/action_controller/metal/rack_delegation.rb +9 -3
- data/lib/action_controller/metal/redirecting.rb +15 -20
- data/lib/action_controller/metal/renderers.rb +11 -9
- data/lib/action_controller/metal/rendering.rb +8 -0
- data/lib/action_controller/metal/request_forgery_protection.rb +112 -19
- data/lib/action_controller/metal/responder.rb +20 -19
- data/lib/action_controller/metal/streaming.rb +12 -18
- data/lib/action_controller/metal/strong_parameters.rb +516 -0
- data/lib/action_controller/metal/testing.rb +13 -18
- data/lib/action_controller/metal/url_for.rb +27 -25
- data/lib/action_controller/model_naming.rb +12 -0
- data/lib/action_controller/railtie.rb +33 -17
- data/lib/action_controller/railties/helpers.rb +22 -0
- data/lib/action_controller/record_identifier.rb +18 -72
- data/lib/action_controller/test_case.rb +215 -123
- data/lib/action_controller/vendor/html-scanner.rb +4 -19
- data/lib/action_dispatch.rb +27 -19
- data/lib/action_dispatch/http/cache.rb +63 -11
- data/lib/action_dispatch/http/filter_parameters.rb +18 -8
- data/lib/action_dispatch/http/filter_redirect.rb +37 -0
- data/lib/action_dispatch/http/headers.rb +27 -19
- data/lib/action_dispatch/http/mime_negotiation.rb +25 -2
- data/lib/action_dispatch/http/mime_type.rb +145 -113
- data/lib/action_dispatch/http/mime_types.rb +1 -1
- data/lib/action_dispatch/http/parameter_filter.rb +44 -46
- data/lib/action_dispatch/http/parameters.rb +12 -5
- data/lib/action_dispatch/http/rack_cache.rb +2 -3
- data/lib/action_dispatch/http/request.rb +49 -18
- data/lib/action_dispatch/http/response.rb +129 -35
- data/lib/action_dispatch/http/upload.rb +60 -17
- data/lib/action_dispatch/http/url.rb +53 -31
- data/lib/action_dispatch/journey.rb +5 -0
- data/lib/action_dispatch/journey/backwards.rb +5 -0
- data/lib/action_dispatch/journey/formatter.rb +146 -0
- data/lib/action_dispatch/journey/gtg/builder.rb +162 -0
- data/lib/action_dispatch/journey/gtg/simulator.rb +44 -0
- data/lib/action_dispatch/journey/gtg/transition_table.rb +156 -0
- data/lib/action_dispatch/journey/nfa/builder.rb +76 -0
- data/lib/action_dispatch/journey/nfa/dot.rb +36 -0
- data/lib/action_dispatch/journey/nfa/simulator.rb +47 -0
- data/lib/action_dispatch/journey/nfa/transition_table.rb +163 -0
- data/lib/action_dispatch/journey/nodes/node.rb +124 -0
- data/lib/action_dispatch/journey/parser.rb +206 -0
- data/lib/action_dispatch/journey/parser.y +47 -0
- data/lib/action_dispatch/journey/parser_extras.rb +23 -0
- data/lib/action_dispatch/journey/path/pattern.rb +196 -0
- data/lib/action_dispatch/journey/route.rb +116 -0
- data/lib/action_dispatch/journey/router.rb +164 -0
- data/lib/action_dispatch/journey/router/strexp.rb +24 -0
- data/lib/action_dispatch/journey/router/utils.rb +54 -0
- data/lib/action_dispatch/journey/routes.rb +75 -0
- data/lib/action_dispatch/journey/scanner.rb +61 -0
- data/lib/action_dispatch/journey/visitors.rb +189 -0
- data/lib/action_dispatch/journey/visualizer/fsm.css +34 -0
- data/lib/action_dispatch/journey/visualizer/fsm.js +134 -0
- data/lib/action_dispatch/journey/visualizer/index.html.erb +52 -0
- data/lib/action_dispatch/middleware/callbacks.rb +9 -4
- data/lib/action_dispatch/middleware/cookies.rb +168 -57
- data/lib/action_dispatch/middleware/debug_exceptions.rb +26 -17
- data/lib/action_dispatch/middleware/exception_wrapper.rb +27 -3
- data/lib/action_dispatch/middleware/flash.rb +58 -58
- data/lib/action_dispatch/middleware/params_parser.rb +14 -29
- data/lib/action_dispatch/middleware/public_exceptions.rb +31 -14
- data/lib/action_dispatch/middleware/reloader.rb +6 -6
- data/lib/action_dispatch/middleware/remote_ip.rb +145 -39
- data/lib/action_dispatch/middleware/request_id.rb +2 -6
- data/lib/action_dispatch/middleware/session/abstract_store.rb +22 -20
- data/lib/action_dispatch/middleware/session/cache_store.rb +3 -3
- data/lib/action_dispatch/middleware/session/cookie_store.rb +81 -7
- data/lib/action_dispatch/middleware/session/mem_cache_store.rb +8 -3
- data/lib/action_dispatch/middleware/show_exceptions.rb +12 -45
- data/lib/action_dispatch/middleware/ssl.rb +70 -0
- data/lib/action_dispatch/middleware/stack.rb +6 -1
- data/lib/action_dispatch/middleware/static.rb +5 -24
- data/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb +14 -11
- data/lib/action_dispatch/middleware/templates/rescues/_source.erb +25 -0
- data/lib/action_dispatch/middleware/templates/rescues/_trace.erb +3 -3
- data/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb +15 -9
- data/lib/action_dispatch/middleware/templates/rescues/layout.erb +121 -5
- data/lib/action_dispatch/middleware/templates/rescues/missing_template.erb +7 -2
- data/lib/action_dispatch/middleware/templates/rescues/routing_error.erb +30 -15
- data/lib/action_dispatch/middleware/templates/rescues/template_error.erb +39 -13
- data/lib/action_dispatch/middleware/templates/rescues/unknown_action.erb +6 -2
- data/lib/action_dispatch/middleware/templates/routes/_route.html.erb +16 -0
- data/lib/action_dispatch/middleware/templates/routes/_table.html.erb +144 -0
- data/lib/action_dispatch/railtie.rb +16 -6
- data/lib/action_dispatch/request/session.rb +181 -0
- data/lib/action_dispatch/routing.rb +41 -40
- data/lib/action_dispatch/routing/inspector.rb +240 -0
- data/lib/action_dispatch/routing/mapper.rb +501 -273
- data/lib/action_dispatch/routing/polymorphic_routes.rb +16 -20
- data/lib/action_dispatch/routing/redirection.rb +46 -29
- data/lib/action_dispatch/routing/route_set.rb +203 -164
- data/lib/action_dispatch/routing/routes_proxy.rb +2 -0
- data/lib/action_dispatch/routing/url_for.rb +48 -33
- data/lib/action_dispatch/testing/assertions/dom.rb +3 -13
- data/lib/action_dispatch/testing/assertions/response.rb +32 -40
- data/lib/action_dispatch/testing/assertions/routing.rb +40 -39
- data/lib/action_dispatch/testing/assertions/selector.rb +15 -20
- data/lib/action_dispatch/testing/assertions/tag.rb +20 -23
- data/lib/action_dispatch/testing/integration.rb +41 -22
- data/lib/action_dispatch/testing/test_process.rb +9 -6
- data/lib/action_dispatch/testing/test_request.rb +7 -3
- data/lib/action_pack.rb +1 -1
- data/lib/action_pack/version.rb +4 -4
- data/lib/action_view.rb +17 -8
- data/lib/action_view/base.rb +15 -34
- data/lib/action_view/buffers.rb +1 -1
- data/lib/action_view/context.rb +4 -4
- data/lib/action_view/dependency_tracker.rb +91 -0
- data/lib/action_view/digestor.rb +85 -0
- data/lib/action_view/flows.rb +1 -4
- data/lib/action_view/helpers.rb +2 -4
- data/lib/action_view/helpers/active_model_helper.rb +3 -4
- data/lib/action_view/helpers/asset_tag_helper.rb +211 -353
- data/lib/action_view/helpers/asset_url_helper.rb +354 -0
- data/lib/action_view/helpers/atom_feed_helper.rb +13 -10
- data/lib/action_view/helpers/cache_helper.rb +150 -18
- data/lib/action_view/helpers/capture_helper.rb +42 -29
- data/lib/action_view/helpers/csrf_helper.rb +0 -2
- data/lib/action_view/helpers/date_helper.rb +268 -247
- data/lib/action_view/helpers/debug_helper.rb +10 -11
- data/lib/action_view/helpers/form_helper.rb +904 -547
- data/lib/action_view/helpers/form_options_helper.rb +341 -166
- data/lib/action_view/helpers/form_tag_helper.rb +188 -88
- data/lib/action_view/helpers/javascript_helper.rb +23 -16
- data/lib/action_view/helpers/number_helper.rb +148 -354
- data/lib/action_view/helpers/output_safety_helper.rb +3 -3
- data/lib/action_view/helpers/record_tag_helper.rb +17 -22
- data/lib/action_view/helpers/rendering_helper.rb +2 -4
- data/lib/action_view/helpers/sanitize_helper.rb +3 -6
- data/lib/action_view/helpers/tag_helper.rb +43 -37
- data/lib/action_view/helpers/tags.rb +39 -0
- data/lib/action_view/helpers/tags/base.rb +148 -0
- data/lib/action_view/helpers/tags/check_box.rb +64 -0
- data/lib/action_view/helpers/tags/checkable.rb +16 -0
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +43 -0
- data/lib/action_view/helpers/tags/collection_helpers.rb +83 -0
- data/lib/action_view/helpers/tags/collection_radio_buttons.rb +36 -0
- data/lib/action_view/helpers/tags/collection_select.rb +28 -0
- data/lib/action_view/helpers/tags/color_field.rb +25 -0
- data/lib/action_view/helpers/tags/date_field.rb +13 -0
- data/lib/action_view/helpers/tags/date_select.rb +72 -0
- data/lib/action_view/helpers/tags/datetime_field.rb +22 -0
- data/lib/action_view/helpers/tags/datetime_local_field.rb +19 -0
- data/lib/action_view/helpers/tags/datetime_select.rb +8 -0
- data/lib/action_view/helpers/tags/email_field.rb +8 -0
- data/lib/action_view/helpers/tags/file_field.rb +8 -0
- data/lib/action_view/helpers/tags/grouped_collection_select.rb +29 -0
- data/lib/action_view/helpers/tags/hidden_field.rb +8 -0
- data/lib/action_view/helpers/tags/label.rb +65 -0
- data/lib/action_view/helpers/tags/month_field.rb +13 -0
- data/lib/action_view/helpers/tags/number_field.rb +18 -0
- data/lib/action_view/helpers/tags/password_field.rb +12 -0
- data/lib/action_view/helpers/tags/radio_button.rb +31 -0
- data/lib/action_view/helpers/tags/range_field.rb +8 -0
- data/lib/action_view/helpers/tags/search_field.rb +24 -0
- data/lib/action_view/helpers/tags/select.rb +41 -0
- data/lib/action_view/helpers/tags/tel_field.rb +8 -0
- data/lib/action_view/helpers/tags/text_area.rb +18 -0
- data/lib/action_view/helpers/tags/text_field.rb +29 -0
- data/lib/action_view/helpers/tags/time_field.rb +13 -0
- data/lib/action_view/helpers/tags/time_select.rb +8 -0
- data/lib/action_view/helpers/tags/time_zone_select.rb +20 -0
- data/lib/action_view/helpers/tags/url_field.rb +8 -0
- data/lib/action_view/helpers/tags/week_field.rb +13 -0
- data/lib/action_view/helpers/text_helper.rb +126 -113
- data/lib/action_view/helpers/translation_helper.rb +32 -16
- data/lib/action_view/helpers/url_helper.rb +200 -271
- data/lib/action_view/locale/en.yml +1 -105
- data/lib/action_view/log_subscriber.rb +6 -4
- data/lib/action_view/lookup_context.rb +15 -39
- data/lib/action_view/model_naming.rb +12 -0
- data/lib/action_view/path_set.rb +9 -39
- data/lib/action_view/railtie.rb +6 -22
- data/lib/action_view/record_identifier.rb +84 -0
- data/lib/action_view/renderer/abstract_renderer.rb +10 -19
- data/lib/action_view/renderer/partial_renderer.rb +144 -81
- data/lib/action_view/renderer/renderer.rb +2 -19
- data/lib/action_view/renderer/streaming_template_renderer.rb +2 -5
- data/lib/action_view/renderer/template_renderer.rb +14 -13
- data/lib/action_view/routing_url_for.rb +107 -0
- data/lib/action_view/template.rb +22 -21
- data/lib/action_view/template/error.rb +22 -12
- data/lib/action_view/template/handlers.rb +12 -9
- data/lib/action_view/template/handlers/builder.rb +1 -1
- data/lib/action_view/template/handlers/erb.rb +11 -16
- data/lib/action_view/template/handlers/raw.rb +11 -0
- data/lib/action_view/template/resolver.rb +111 -83
- data/lib/action_view/template/text.rb +12 -8
- data/lib/action_view/template/types.rb +57 -0
- data/lib/action_view/test_case.rb +66 -43
- data/lib/action_view/testing/resolvers.rb +3 -2
- data/lib/action_view/vendor/html-scanner.rb +20 -0
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/document.rb +0 -0
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/node.rb +12 -12
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/sanitizer.rb +18 -7
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/selector.rb +1 -1
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/tokenizer.rb +1 -1
- data/lib/{action_controller → action_view}/vendor/html-scanner/html/version.rb +0 -0
- metadata +135 -125
- data/lib/action_controller/caching/actions.rb +0 -185
- data/lib/action_controller/caching/pages.rb +0 -187
- data/lib/action_controller/caching/sweeping.rb +0 -97
- data/lib/action_controller/deprecated/performance_test.rb +0 -1
- data/lib/action_controller/metal/compatibility.rb +0 -65
- data/lib/action_controller/metal/session_management.rb +0 -14
- data/lib/action_controller/railties/paths.rb +0 -25
- data/lib/action_dispatch/middleware/best_standards_support.rb +0 -30
- data/lib/action_dispatch/middleware/body_proxy.rb +0 -30
- data/lib/action_dispatch/middleware/head.rb +0 -18
- data/lib/action_dispatch/middleware/rescue.rb +0 -26
- data/lib/action_dispatch/testing/performance_test.rb +0 -10
- data/lib/action_view/asset_paths.rb +0 -142
- data/lib/action_view/helpers/asset_paths.rb +0 -7
- data/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb +0 -146
- data/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb +0 -93
- data/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb +0 -193
- data/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb +0 -148
- data/lib/sprockets/assets.rake +0 -99
- data/lib/sprockets/bootstrap.rb +0 -37
- data/lib/sprockets/compressors.rb +0 -83
- data/lib/sprockets/helpers.rb +0 -6
- data/lib/sprockets/helpers/isolated_helper.rb +0 -13
- data/lib/sprockets/helpers/rails_helper.rb +0 -182
- data/lib/sprockets/railtie.rb +0 -62
- data/lib/sprockets/static_compiler.rb +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3463df116c388c7b2d15a3ac267fea12a100cf1
|
4
|
+
data.tar.gz: ad55681ebfbc24cbb11d1b06a5e31943a4515a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83abc4ab5ba7fe34ad23f5f29bc7eee985ae62a7ea949fc84b942b9dbd3b3c8caebd692f5c52765a972c0e993edd1efb18b2a244ffb8917358f3743718ab90f9
|
7
|
+
data.tar.gz: 91d22e18c2143a67a92fa61cf346adce168373835e7636de2a125de336958e3f528ba1a83807417dc7f541ce3156c08c88641273d05dacfc268f5ccea8cc05f5
|
data/CHANGELOG.md
CHANGED
@@ -1,394 +1,478 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 4.0.0.beta1 (February 25, 2013) ##
|
2
2
|
|
3
|
-
*
|
3
|
+
* Fix `respond_to` not using formats that have no block if all is present. *Michael Grosser*
|
4
4
|
|
5
|
+
* New applications use an encrypted session store by default.
|
5
6
|
|
6
|
-
|
7
|
+
*Santiago Pastorino*
|
7
8
|
|
8
|
-
*
|
9
|
-
|
9
|
+
* Determine the controller#action from only the matched path when using the
|
10
|
+
shorthand syntax. Previously the complete path was used, which led
|
11
|
+
to problems with nesting (scopes and namespaces).
|
12
|
+
Fixes #7554.
|
10
13
|
|
11
|
-
|
14
|
+
Example:
|
12
15
|
|
13
|
-
|
16
|
+
# This will route to questions#new.
|
17
|
+
scope ':locale' do
|
18
|
+
get 'questions/new'
|
19
|
+
end
|
14
20
|
|
21
|
+
*Yves Senn*
|
15
22
|
|
16
|
-
|
23
|
+
* Remove support for parsing XML parameters from request. If you still want to parse XML
|
24
|
+
parameters, please install `actionpack-xml_parser' gem.
|
17
25
|
|
18
|
-
*
|
26
|
+
*Prem Sichanugrist*
|
19
27
|
|
20
|
-
|
28
|
+
* Remove support for parsing YAML parameters from request.
|
21
29
|
|
22
|
-
|
30
|
+
*Aaron Patterson*
|
23
31
|
|
24
|
-
|
32
|
+
* Add a message when you have no routes defined to both `rake routes` and
|
33
|
+
GET "/rails/info/routes" that lets you know you have none defined and links
|
34
|
+
to the Rails guide on the topic.
|
25
35
|
|
36
|
+
*Steve Klabnik*
|
26
37
|
|
27
|
-
|
38
|
+
* Change `image_alt` method to replace underscores/hyphens to spaces in filenames.
|
28
39
|
|
29
|
-
|
40
|
+
Previously, underscored filenames became `alt="A_long_file_name_with_underscores"`
|
41
|
+
in HTML, which is poor for accessibility. For instance, Apple's VoiceOver Utility
|
42
|
+
pronounces each underscore. `A_long_file_name` thus would be read as `A underscore
|
43
|
+
long underscore file underscore name.` Now underscored or hyphenated filenames
|
44
|
+
(both of which are very popular naming conventions) read more naturally in
|
45
|
+
screen readers by converting both hyphens and underscores to spaces.
|
30
46
|
|
31
|
-
|
47
|
+
Before:
|
32
48
|
|
33
|
-
|
49
|
+
image_tag('underscored_file_name.png')
|
50
|
+
# => <img alt="Underscored_file_name" src="/assets/underscored_file_name.png" />
|
34
51
|
|
35
|
-
|
52
|
+
After:
|
36
53
|
|
54
|
+
image_tag('underscored_file_name.png')
|
55
|
+
# => <img alt="Underscored file name" src="/assets/underscored_file_name.png" />
|
37
56
|
|
38
|
-
|
57
|
+
*Nick Cox*
|
39
58
|
|
40
|
-
*
|
59
|
+
* We don't support Ruby constant notation in the `:controller` option for route
|
60
|
+
definitions. So, this raises an `ArgumentError` now:
|
41
61
|
|
42
|
-
|
62
|
+
resources :posts, controller: "Admin::Posts" # WRONG
|
43
63
|
|
44
|
-
|
64
|
+
Use path notation instead:
|
45
65
|
|
46
|
-
|
66
|
+
resources :posts, controller: "admin/posts" # RIGHT
|
47
67
|
|
48
|
-
|
68
|
+
*Yves Senn*
|
49
69
|
|
50
|
-
*
|
51
|
-
|
70
|
+
* `assert_template` can be used to verify the locals of partials,
|
71
|
+
which live inside a directory.
|
52
72
|
|
53
|
-
|
54
|
-
|
73
|
+
# Prefixed partials inside directories worked and still work.
|
74
|
+
assert_template partial: 'directory/_partial', locals: {name: 'John'}
|
55
75
|
|
56
|
-
|
76
|
+
# This did not work but does now.
|
77
|
+
assert_template partial: 'directory/partial', locals: {name: 'John'}
|
57
78
|
|
58
|
-
|
59
|
-
constraints on the querystring.
|
79
|
+
Fixes #8516.
|
60
80
|
|
61
|
-
|
62
|
-
Backport #5219
|
81
|
+
*Yves Senn*
|
63
82
|
|
64
|
-
|
83
|
+
* Fix `content_tag_for` with array HTML option.
|
84
|
+
It would embed array as string instead of joining it like `content_tag` does:
|
65
85
|
|
66
|
-
|
86
|
+
content_tag(:td, class: ["foo", "bar"]){}
|
87
|
+
# => <td class="foo bar"></td>
|
67
88
|
|
68
|
-
|
89
|
+
Before:
|
69
90
|
|
70
|
-
|
71
|
-
|
91
|
+
content_tag_for(:td, item, class: ["foo", "bar"])
|
92
|
+
# => <td class="item ["foo", "bar"]" id="item_1"></td>
|
72
93
|
|
73
|
-
|
74
|
-
matching the expected redirect the user-supplied message (second parameter)
|
75
|
-
is not shown. This message is only shown if the response is not a redirect.
|
94
|
+
After:
|
76
95
|
|
77
|
-
|
96
|
+
content_tag_for(:td, item, class: ["foo", "bar"])
|
97
|
+
# => <td class="item foo bar" id="item_1"></td>
|
78
98
|
|
99
|
+
*Semyon Perepelitsa*
|
79
100
|
|
80
|
-
|
101
|
+
* Remove `BestStandardsSupport` middleware, !DOCTYPE html already triggers
|
102
|
+
standards mode per http://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx
|
103
|
+
and ChromeFrame header has been moved to `config.action_dispatch.default_headers`
|
81
104
|
|
82
|
-
*
|
83
|
-
and `:action` are present. The endpoint assignment only occurs if there is
|
84
|
-
no `:to` present in the options hash so should only affect routes using the
|
85
|
-
shorthand syntax (i.e. endpoint is inferred from the the path).
|
105
|
+
*Guillermo Iguaran*
|
86
106
|
|
87
|
-
|
107
|
+
* Fix CSRF protection and `current_url?` helper to work with HEAD requests
|
108
|
+
now that `ActionDispatch::Head` has been removed in favor of `Rack::Head`.
|
88
109
|
|
89
|
-
*
|
110
|
+
*Michiel Sikkes*
|
90
111
|
|
91
|
-
*
|
112
|
+
* Change `asset_path` to not include `SCRIPT_NAME` when it's used
|
113
|
+
from a mounted engine. Fixes #8119.
|
92
114
|
|
93
|
-
|
115
|
+
*Piotr Sarnacki*
|
94
116
|
|
95
|
-
|
96
|
-
|
117
|
+
* Add JavaScript based routing path matcher to `/rails/info/routes`.
|
118
|
+
Routes can now be filtered by whether or not they match a path.
|
97
119
|
|
98
|
-
|
120
|
+
*Richard Schneeman*
|
99
121
|
|
100
|
-
|
101
|
-
|
122
|
+
* Change the behavior of route defaults so that explicit defaults are no longer
|
123
|
+
required where the key is not part of the path. For example:
|
102
124
|
|
103
|
-
|
125
|
+
resources :posts, bucket_type: 'posts'
|
104
126
|
|
105
|
-
|
127
|
+
will be required whenever constructing the url from a hash such as a functional
|
128
|
+
test or using `url_for` directly. However using the explicit form alters the
|
129
|
+
behavior so it's not required:
|
106
130
|
|
107
|
-
|
108
|
-
different URIs.
|
131
|
+
resources :projects, defaults: { bucket_type: 'projects' }
|
109
132
|
|
110
|
-
|
133
|
+
This changes existing behavior slightly in that any routes which only differ
|
134
|
+
in their defaults will match the first route rather than the closest match.
|
111
135
|
|
112
|
-
|
113
|
-
# => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />"
|
114
|
-
image_tag("http://google.com")
|
115
|
-
# => "<img alt=\"Google\" src=\"http://google.com\" />"
|
136
|
+
*Andrew White*
|
116
137
|
|
117
|
-
|
138
|
+
* Add support for routing constraints other than Regexp and String.
|
139
|
+
For example this now allows the use of arrays like this:
|
140
|
+
|
141
|
+
get '/foo/:action', to: 'foo', constraints: { subdomain: %w[www admin] }
|
118
142
|
|
119
|
-
|
120
|
-
# => "<img alt=\"Google\" src=\"HTTP://google.com\" />"
|
121
|
-
image_tag("http://google.com")
|
122
|
-
# => "<img alt=\"Google\" src=\"http://google.com\" />"
|
143
|
+
or constraints where the request method returns an Fixnum like this:
|
123
144
|
|
124
|
-
|
145
|
+
get '/foo', to: 'foo#index', constraints: { port: 8080 }
|
125
146
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
appended.
|
130
|
-
Fixes #9830.
|
147
|
+
Note that this only applies to constraints on the request - path constraints
|
148
|
+
still need to be specified as Regexps as the various constraints are compiled
|
149
|
+
into a single Regexp.
|
131
150
|
|
132
|
-
*
|
151
|
+
*Andrew White*
|
133
152
|
|
134
|
-
* Fix
|
153
|
+
* Fix a bug in integration tests where setting the port via a url passed to
|
154
|
+
the process method was ignored when constructing the request environment.
|
135
155
|
|
136
|
-
|
137
|
-
for those files their extensions don't need to be rewritten.
|
156
|
+
*Andrew White*
|
138
157
|
|
139
|
-
|
158
|
+
* Allow `:selected` to be set on `date_select` tag helper.
|
140
159
|
|
141
|
-
*
|
160
|
+
*Colin Burn-Murdoch*
|
142
161
|
|
143
|
-
*
|
144
|
-
Fixes #9799.
|
162
|
+
* Fixed JSON params parsing regression for non-object JSON content.
|
145
163
|
|
146
|
-
*
|
164
|
+
*Dylan Smith*
|
147
165
|
|
148
|
-
* `
|
149
|
-
|
150
|
-
than the largest key provided.
|
166
|
+
* Extract `ActionDispatch::PerformanceTest` into https://github.com/rails/rails-perftest
|
167
|
+
You can add the gem to your Gemfile to keep using performance tests.
|
151
168
|
|
152
|
-
|
169
|
+
gem 'rails-perftest'
|
153
170
|
|
154
|
-
|
155
|
-
number_to_human(123, units: { thousand: 'k' }) # => 123
|
171
|
+
*Yves Senn*
|
156
172
|
|
157
|
-
|
158
|
-
|
173
|
+
* Added view_cache_dependency API for declaring dependencies that affect
|
174
|
+
cache digest computation.
|
159
175
|
|
160
|
-
*
|
176
|
+
*Jamis Buck*
|
161
177
|
|
162
|
-
*
|
163
|
-
|
178
|
+
* `image_submit_tag` will set `alt` attribute from image source if not
|
179
|
+
specified.
|
164
180
|
|
165
|
-
*
|
181
|
+
*Nihad Abbasov*
|
166
182
|
|
167
|
-
*
|
168
|
-
|
183
|
+
* Do not generate local variables for partials without object or collection.
|
184
|
+
Previously rendering a partial without giving `:object` or `:collection`
|
185
|
+
would generate a local variable with the partial name by default.
|
169
186
|
|
170
|
-
*
|
187
|
+
*Carlos Antonio da Silva*
|
171
188
|
|
189
|
+
* Return the last valid, non-private IP address from the X-Forwarded-For,
|
190
|
+
Client-IP and Remote-Addr headers, in that order. Document the rationale
|
191
|
+
for that decision, and describe the options that can be passed to the
|
192
|
+
RemoteIp middleware to change it.
|
193
|
+
Fix #7979
|
172
194
|
|
173
|
-
|
195
|
+
*André Arko*, *Steve Klabnik*, *Alexey Gaziev*
|
174
196
|
|
175
|
-
*
|
176
|
-
|
197
|
+
* Do not append second slash to `root_url` when using `trailing_slash: true`
|
198
|
+
Fix #8700
|
177
199
|
|
178
200
|
Before:
|
179
201
|
|
180
|
-
|
181
|
-
# => <select name="post[category][][]" ...>
|
202
|
+
root_url(trailing_slash: true) # => http://test.host//
|
182
203
|
|
183
204
|
After:
|
184
205
|
|
185
|
-
|
186
|
-
# => <select name="post[category][]" ...>
|
206
|
+
root_url(trailing_slash: true) # => http://test.host/
|
187
207
|
|
188
|
-
|
208
|
+
*Yves Senn*
|
189
209
|
|
190
|
-
|
210
|
+
* Allow to toggle dumps on error pages.
|
191
211
|
|
192
|
-
*
|
193
|
-
shorthand syntax. Previously the complete path was used, which led
|
194
|
-
to problems with nesting (scopes and namespaces).
|
195
|
-
Fixes #7554.
|
196
|
-
Backport #9361.
|
212
|
+
*Gosha Arinich*
|
197
213
|
|
198
|
-
|
214
|
+
* Fix a bug in `content_tag_for` that prevents it from working without a block.
|
199
215
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
216
|
+
*Jasl*
|
217
|
+
|
218
|
+
* Change the stylesheet of exception pages for development mode.
|
219
|
+
Additionally display also the line of code and fragment that raised
|
220
|
+
the exception in all exceptions pages.
|
221
|
+
|
222
|
+
*Guillermo Iguaran + Jorge Cuadrado*
|
223
|
+
|
224
|
+
* Do not append `charset=` parameter when `head` is called with a
|
225
|
+
`:content_type` option.
|
226
|
+
Fix #8661.
|
204
227
|
|
205
228
|
*Yves Senn*
|
206
229
|
|
207
|
-
*
|
208
|
-
|
209
|
-
Backport #5288.
|
230
|
+
* Added `Mime::NullType` class. This allows to use `html?`, `xml?`, `json?`, etc.
|
231
|
+
when the format of the request is unknown, without raising an exception.
|
210
232
|
|
211
|
-
*
|
233
|
+
*Angelo Capilleri*
|
212
234
|
|
213
|
-
*
|
214
|
-
not
|
235
|
+
* Integrate the Journey gem into Action Dispatch so that the global namespace
|
236
|
+
is not polluted with names that may be used as models.
|
215
237
|
|
216
|
-
*
|
238
|
+
*Andrew White*
|
217
239
|
|
218
|
-
*
|
219
|
-
|
240
|
+
* Extract support for email address obfuscation via `:encode`, `:replace_at`, and `replace_dot`
|
241
|
+
options from the `mail_to` helper into the `actionview-encoded_mail_to` gem.
|
220
242
|
|
221
|
-
*
|
243
|
+
*Nick Reed + DHH*
|
222
244
|
|
223
|
-
*
|
245
|
+
* Handle `:protocol` option in `stylesheet_link_tag` and `javascript_include_tag`
|
224
246
|
|
225
|
-
*
|
247
|
+
*Vasiliy Ermolovich*
|
226
248
|
|
227
|
-
*
|
228
|
-
files with non-standard extensions.
|
249
|
+
* Clear url helper methods when routes are reloaded. *Andrew White*
|
229
250
|
|
230
|
-
|
251
|
+
* Fix a bug in `ActionDispatch::Request#raw_post` that caused `env['rack.input']`
|
252
|
+
to be read but not rewound.
|
231
253
|
|
232
|
-
*
|
254
|
+
*Matt Venables*
|
233
255
|
|
234
|
-
|
256
|
+
* Prevent raising `EOFError` on multipart GET request (IE issue). *Adam Stankiewicz*
|
235
257
|
|
236
|
-
*
|
258
|
+
* Rename all action callbacks from *_filter to *_action to avoid the misconception that these
|
259
|
+
callbacks are only suited for transforming or halting the response. With the new style,
|
260
|
+
it's more inviting to use them as they were intended, like setting shared ivars for views.
|
237
261
|
|
238
|
-
|
262
|
+
Example:
|
239
263
|
|
240
|
-
|
264
|
+
class PeopleController < ActionController::Base
|
265
|
+
before_action :set_person, except: [:index, :new, :create]
|
266
|
+
before_action :ensure_permission, only: [:edit, :update]
|
267
|
+
|
268
|
+
...
|
269
|
+
|
270
|
+
private
|
271
|
+
def set_person
|
272
|
+
@person = current_account.people.find(params[:id])
|
273
|
+
end
|
274
|
+
|
275
|
+
def ensure_permission
|
276
|
+
current_person.can_change?(@person)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
The old *_filter methods still work with no deprecation notice.
|
281
|
+
|
282
|
+
*DHH*
|
241
283
|
|
242
|
-
|
243
|
-
Backport #8701.
|
284
|
+
* Add `cache_if` and `cache_unless` for conditional fragment caching:
|
244
285
|
|
245
286
|
Example:
|
246
|
-
# before
|
247
|
-
root_url # => http://test.host//
|
248
287
|
|
249
|
-
|
250
|
-
|
288
|
+
<%= cache_if condition, project do %>
|
289
|
+
<b>All the topics on this project</b>
|
290
|
+
<%= render project.topics %>
|
291
|
+
<% end %>
|
251
292
|
|
252
|
-
|
293
|
+
# and
|
253
294
|
|
254
|
-
|
295
|
+
<%= cache_unless condition, project do %>
|
296
|
+
<b>All the topics on this project</b>
|
297
|
+
<%= render project.topics %>
|
298
|
+
<% end %>
|
255
299
|
|
256
|
-
*
|
300
|
+
*Stephen Ausman + Fabrizio Regini + Angelo Capilleri*
|
257
301
|
|
258
|
-
*
|
259
|
-
explicitly rather than just clearing the module because it didn't work
|
260
|
-
properly and could be the source of a memory leak.
|
302
|
+
* Add logging filter capability for redirect URLs:
|
261
303
|
|
262
|
-
|
304
|
+
config.filter_redirect << 'http://please.hide.it/'
|
263
305
|
|
264
|
-
*
|
265
|
-
to be read but not rewound.
|
306
|
+
*Fabrizio Regini*
|
266
307
|
|
267
|
-
|
308
|
+
* Fixed a bug that ignores constraints on a glob route. This was caused because the constraint
|
309
|
+
regular expression is overwritten when the `routes.rb` file is processed. Fixes #7924
|
310
|
+
|
311
|
+
*Maura Fitzgerald*
|
268
312
|
|
269
313
|
* More descriptive error messages when calling `render :partial` with
|
270
314
|
an invalid `:layout` argument.
|
271
315
|
|
272
316
|
Fixes #8376.
|
273
317
|
|
274
|
-
render :
|
318
|
+
render partial: 'partial', layout: true
|
319
|
+
|
275
320
|
# results in ActionView::MissingTemplate: Missing partial /true
|
276
321
|
|
277
322
|
*Yves Senn*
|
278
323
|
|
279
|
-
*
|
324
|
+
* Sweepers was extracted from Action Controller as `rails-observers` gem.
|
325
|
+
|
326
|
+
*Rafael Mendonça França*
|
280
327
|
|
281
|
-
* Add
|
328
|
+
* Add option flag to `CacheHelper#cache` to manually bypass automatic template digests:
|
282
329
|
|
283
|
-
|
284
|
-
|
330
|
+
<% cache project, skip_digest: true do %>
|
331
|
+
...
|
332
|
+
<% end %>
|
285
333
|
|
286
|
-
|
287
|
-
url_for :controller => controller, :action => 'status'
|
334
|
+
*Drew Ulmer*
|
288
335
|
|
289
|
-
|
336
|
+
* Do not sort Hash options in `grouped_options_for_select`. *Sergey Kojin*
|
290
337
|
|
291
|
-
|
338
|
+
* Accept symbols as `send_data :disposition` value *Elia Schito*
|
292
339
|
|
293
|
-
|
340
|
+
* Add i18n scope to `distance_of_time_in_words`. *Steve Klabnik*
|
294
341
|
|
295
|
-
|
342
|
+
* `assert_template`:
|
343
|
+
- is no more passing with empty string.
|
344
|
+
- is now validating option keys. It accepts: `:layout`, `:partial`, `:locals` and `:count`.
|
296
345
|
|
297
|
-
*
|
298
|
-
of mime types where template text is not html escaped by default. It prevents `Jack & Joe`
|
299
|
-
from rendering as `Jack & Joe` for the whitelisted mime types. The default whitelist
|
300
|
-
contains text/plain. Fix #7976 [Backport #8235]
|
346
|
+
*Roberto Soares*
|
301
347
|
|
302
|
-
|
348
|
+
* Allow setting a symbol as path in scope on routes. This is now allowed:
|
303
349
|
|
304
|
-
|
305
|
-
|
350
|
+
scope :api do
|
351
|
+
resources :users
|
352
|
+
end
|
306
353
|
|
307
|
-
|
354
|
+
It is also possible to pass multiple symbols to scope to shorten multiple nested scopes:
|
308
355
|
|
309
|
-
|
310
|
-
|
356
|
+
scope :api do
|
357
|
+
scope :v1 do
|
358
|
+
resources :users
|
359
|
+
end
|
360
|
+
end
|
311
361
|
|
312
|
-
|
362
|
+
can be rewritten as:
|
313
363
|
|
314
|
-
|
364
|
+
scope :api, :v1 do
|
365
|
+
resources :users
|
366
|
+
end
|
367
|
+
|
368
|
+
*Guillermo Iguaran + Amparo Luna*
|
369
|
+
|
370
|
+
* Fix error when using a non-hash query argument named "params" in `url_for`.
|
315
371
|
|
316
372
|
Before:
|
317
373
|
|
318
|
-
|
319
|
-
#=> <input name=\"post[foo][comment_ids]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids]\" type=\"checkbox\" value=\"1\" />
|
374
|
+
url_for(params: "") # => undefined method `reject!' for "":String
|
320
375
|
|
321
376
|
After:
|
322
377
|
|
323
|
-
|
324
|
-
#=> <input name=\"post[foo][comment_ids][]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids][]\" type=\"checkbox\" value=\"1\" />
|
378
|
+
url_for(params: "") # => http://www.example.com?params=
|
325
379
|
|
326
|
-
|
380
|
+
*tumayun + Carlos Antonio da Silva*
|
327
381
|
|
328
|
-
|
382
|
+
* Render every partial with a new `ActionView::PartialRenderer`. This resolves
|
383
|
+
issues when rendering nested partials.
|
384
|
+
Fix #8197.
|
329
385
|
|
386
|
+
*Yves Senn*
|
330
387
|
|
331
|
-
|
388
|
+
* Introduce `ActionView::Template::Handlers::ERB.escape_whitelist`. This is a list
|
389
|
+
of mime types where template text is not html escaped by default. It prevents `Jack & Joe`
|
390
|
+
from rendering as `Jack & Joe` for the whitelisted mime types. The default whitelist
|
391
|
+
contains `text/plain`.
|
392
|
+
Fix #7976.
|
332
393
|
|
333
|
-
*
|
394
|
+
*Joost Baaij*
|
334
395
|
|
396
|
+
* Fix input name when `multiple: true` and `:index` are set.
|
335
397
|
|
336
|
-
|
398
|
+
Before:
|
337
399
|
|
338
|
-
|
400
|
+
check_box("post", "comment_ids", { multiple: true, index: "foo" }, 1)
|
401
|
+
# => <input name=\"post[foo][comment_ids]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids]\" type=\"checkbox\" value=\"1\" />
|
339
402
|
|
403
|
+
After:
|
340
404
|
|
341
|
-
|
405
|
+
check_box("post", "comment_ids", { multiple: true, index: "foo" }, 1)
|
406
|
+
# => <input name=\"post[foo][comment_ids][]\" type=\"hidden\" value=\"0\" /><input id=\"post_foo_comment_ids_1\" name=\"post[foo][comment_ids][]\" type=\"checkbox\" value=\"1\" />
|
342
407
|
|
343
|
-
|
408
|
+
Fix #8108.
|
344
409
|
|
410
|
+
*Daniel Fox, Grant Hutchins & Trace Wax*
|
345
411
|
|
346
|
-
|
412
|
+
* `date_select` helper accepts `with_css_classes: true` to add css classes similar with type
|
413
|
+
of generated select tags.
|
347
414
|
|
348
|
-
*
|
415
|
+
*Pavel Nikitin*
|
349
416
|
|
350
|
-
|
417
|
+
* Only non-js/css under `app/assets` path will be included in default `config.assets.precompile`.
|
351
418
|
|
352
|
-
*
|
353
|
-
This added a regression since it is changing the URL mapping.
|
354
|
-
This makes the stable release backward compatible.
|
419
|
+
*Josh Peek*
|
355
420
|
|
356
|
-
|
421
|
+
* Remove support for the `RAILS_ASSET_ID` environment configuration
|
422
|
+
(no longer needed now that we have the asset pipeline).
|
357
423
|
|
358
|
-
*
|
359
|
-
This added a regression since people were relying on this buggy behavior.
|
360
|
-
This will introduce back #3849 but this stable release will be backward compatible.
|
361
|
-
Fixes #8068.
|
424
|
+
*Josh Peek*
|
362
425
|
|
363
|
-
|
426
|
+
* Remove old `asset_path` configuration (no longer needed now that we have the asset pipeline).
|
364
427
|
|
365
|
-
*
|
366
|
-
naming collisions. This added a regression related with shoulda-matchers, since it is
|
367
|
-
expecting the [instance variable @layouts](https://github.com/thoughtbot/shoulda-matchers/blob/9e1188eea68c47d9a56ce6280e45027da6187ab1/lib/shoulda/matchers/action_controller/render_with_layout_matcher.rb#L74).
|
368
|
-
This will introduce back #7459 but this stable release will be backward compatible.
|
369
|
-
Fixes #8068.
|
428
|
+
*Josh Peek*
|
370
429
|
|
371
|
-
|
430
|
+
* `assert_template` can be used to assert on the same template with different locals
|
431
|
+
Fix #3675.
|
432
|
+
|
433
|
+
*Yves Senn*
|
372
434
|
|
373
|
-
*
|
435
|
+
* Remove old asset tag concatenation (no longer needed now that we have the asset pipeline).
|
436
|
+
|
437
|
+
*Josh Peek*
|
438
|
+
|
439
|
+
* Accept `:remote` as symbolic option for `link_to` helper. *Riley Lynch*
|
374
440
|
|
375
441
|
* Warn when the `:locals` option is passed to `assert_template` outside of a view test case
|
376
|
-
Fix #3415
|
442
|
+
Fix #3415.
|
377
443
|
|
378
444
|
*Yves Senn*
|
379
445
|
|
380
|
-
*
|
381
|
-
|
382
|
-
|
446
|
+
* The `Rack::Cache` middleware is now disabled by default. To enable it,
|
447
|
+
set `config.action_dispatch.rack_cache = true` and add `gem rack-cache` to your Gemfile.
|
448
|
+
|
449
|
+
*Guillermo Iguaran*
|
450
|
+
|
451
|
+
* `ActionController::Base.page_cache_extension` option is deprecated
|
452
|
+
in favour of `ActionController::Base.default_static_extension`.
|
453
|
+
|
454
|
+
*Francesco Rodriguez*
|
455
|
+
|
456
|
+
* Action and Page caching has been extracted from Action Dispatch
|
457
|
+
as `actionpack-action_caching` and `actionpack-page_caching` gems.
|
458
|
+
Please read the `README.md` file on both gems for the usage.
|
459
|
+
|
460
|
+
*Francesco Rodriguez*
|
461
|
+
|
462
|
+
* Failsafe exception returns `text/plain`. *Steve Klabnik*
|
463
|
+
|
464
|
+
* Rename internal variables on `ActionController::TemplateAssertions` to prevent
|
465
|
+
naming collisions. `@partials`, `@templates` and `@layouts` are now prefixed with an underscore.
|
466
|
+
Fix #7459.
|
383
467
|
|
384
468
|
*Yves Senn*
|
385
469
|
|
386
|
-
* `resource` and `resources` don't modify the passed options hash
|
387
|
-
Fix #7777
|
470
|
+
* `resource` and `resources` don't modify the passed options hash.
|
471
|
+
Fix #7777.
|
388
472
|
|
389
473
|
*Yves Senn*
|
390
474
|
|
391
|
-
* Precompiled assets include aliases from foo.js to foo/index.js and vice versa.
|
475
|
+
* Precompiled assets include aliases from `foo.js` to `foo/index.js` and vice versa.
|
392
476
|
|
393
477
|
# Precompiles phone-<digest>.css and aliases phone/index.css to phone.css.
|
394
478
|
config.assets.precompile = [ 'phone.css' ]
|
@@ -421,366 +505,505 @@
|
|
421
505
|
|
422
506
|
*Hugolnx*
|
423
507
|
|
424
|
-
*
|
425
|
-
|
426
|
-
being available.
|
508
|
+
* `image_tag` will set the same width and height for image if numerical value
|
509
|
+
passed to `size` option.
|
427
510
|
|
428
|
-
*
|
511
|
+
*Nihad Abbasov*
|
429
512
|
|
430
|
-
*
|
513
|
+
* Deprecate `Mime::Type#verify_request?` and `Mime::Type.browser_generated_types`,
|
514
|
+
since they are no longer used inside of Rails, they will be removed in Rails 4.1.
|
431
515
|
|
432
|
-
|
433
|
-
option, but ignored the global config setting. This meant that
|
434
|
-
`config.digest = false` could not be used in conjunction with
|
435
|
-
`config.compile = false` this corrects the behavior.
|
516
|
+
*Michael Grosser*
|
436
517
|
|
437
|
-
|
518
|
+
* `ActionDispatch::Http::UploadedFile` now delegates `close` to its tempfile. *Sergio Gil*
|
438
519
|
|
439
|
-
*
|
520
|
+
* Add `ActionController::StrongParameters`, this module converts `params` hash into
|
521
|
+
an instance of ActionController::Parameters that allows whitelisting of permitted
|
522
|
+
parameters. Non-permitted parameters are forbidden to be used in Active Model by default
|
523
|
+
For more details check the documentation of the module or the
|
524
|
+
[strong_parameters gem](https://github.com/rails/strong_parameters)
|
440
525
|
|
441
|
-
*
|
526
|
+
*DHH + Guillermo Iguaran*
|
442
527
|
|
443
|
-
*
|
444
|
-
|
528
|
+
* Remove Integration between `attr_accessible`/`attr_protected` and
|
529
|
+
`ActionController::ParamsWrapper`. ParamWrapper now wraps all the parameters returned
|
530
|
+
by the class method `attribute_names`.
|
445
531
|
|
446
|
-
*
|
532
|
+
*Guillermo Iguaran*
|
447
533
|
|
448
|
-
*
|
449
|
-
|
534
|
+
* Log now displays the correct status code when an exception is raised.
|
535
|
+
Fix #7646.
|
450
536
|
|
451
|
-
*
|
537
|
+
*Yves Senn*
|
452
538
|
|
453
|
-
*
|
539
|
+
* Allow pass couple extensions to `ActionView::Template.register_template_handler` call.
|
454
540
|
|
455
|
-
*
|
456
|
-
Fixes GH#3047, GH#2483.
|
541
|
+
*Tima Maslyuchenko*
|
457
542
|
|
458
|
-
|
543
|
+
* Sprockets integration has been extracted from Action Pack to the `sprockets-rails`
|
544
|
+
gem. `rails` gem is depending on `sprockets-rails` by default.
|
459
545
|
|
460
|
-
*
|
461
|
-
will usually intercept the response and just uses the path directly, so no reason to open the file. This performance
|
462
|
-
improvement also resolves an issue with jRuby encodings, and is the reason for the backport, see issue #6844.
|
546
|
+
*Guillermo Iguaran*
|
463
547
|
|
464
|
-
|
548
|
+
* `ActionDispatch::Session::MemCacheStore` now uses `dalli` instead of the deprecated
|
549
|
+
`memcache-client` gem.
|
465
550
|
|
551
|
+
*Arun Agrawal + Guillermo Iguaran*
|
466
552
|
|
467
|
-
|
553
|
+
* Support multiple etags in If-None-Match header. *Travis Warlick*
|
468
554
|
|
469
|
-
*
|
470
|
-
|
471
|
-
execute arbitrary javascript through the use of specially crafted malformed
|
472
|
-
html.
|
555
|
+
* Allow to configure how unverified request will be handled using `:with`
|
556
|
+
option in `protect_from_forgery` method.
|
473
557
|
|
474
|
-
|
558
|
+
Valid unverified request handling methods are:
|
475
559
|
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
560
|
+
- `:exception` - Raises ActionController::InvalidAuthenticityToken exception.
|
561
|
+
- `:reset_session` - Resets the session.
|
562
|
+
- `:null_session` - Provides an empty session during request but doesn't
|
563
|
+
reset it completely. Used as default if `:with` option is not specified.
|
480
564
|
|
481
|
-
|
565
|
+
New applications are generated with:
|
482
566
|
|
483
|
-
|
567
|
+
protect_from_forgery with: :exception
|
484
568
|
|
485
|
-
*
|
569
|
+
*Sergey Nartimov*
|
486
570
|
|
487
|
-
*
|
571
|
+
* Add `.ruby` template handler, this handler simply allows arbitrary Ruby code as a template. *Guillermo Iguaran*
|
488
572
|
|
489
|
-
*
|
573
|
+
* Add `separator` option for `ActionView::Helpers::TextHelper#excerpt`:
|
490
574
|
|
491
|
-
|
575
|
+
excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1)
|
576
|
+
# => ...a very beautiful...
|
492
577
|
|
578
|
+
*Guirec Corbel*
|
493
579
|
|
494
|
-
|
580
|
+
* Added controller-level etag additions that will be part of the action etag computation *Jeremy Kemper/DHH*
|
495
581
|
|
496
|
-
|
582
|
+
class InvoicesController < ApplicationController
|
583
|
+
etag { current_user.try :id }
|
497
584
|
|
498
|
-
|
585
|
+
def show
|
586
|
+
# Etag will differ even for the same invoice when it's viewed by a different current_user
|
587
|
+
@invoice = Invoice.find(params[:id])
|
588
|
+
fresh_when(@invoice)
|
589
|
+
end
|
590
|
+
end
|
499
591
|
|
500
|
-
* Add
|
592
|
+
* Add automatic template digests to all `CacheHelper#cache` calls (originally spiked in the `cache_digests` plugin) *DHH*
|
501
593
|
|
502
|
-
*
|
594
|
+
* When building a URL fails, add missing keys provided by Journey. Failed URL
|
595
|
+
generation now returns a 500 status instead of a 404.
|
503
596
|
|
504
|
-
*
|
597
|
+
*Richard Schneeman*
|
505
598
|
|
506
|
-
*
|
599
|
+
* Deprecate availability of `ActionView::RecordIdentifier` in controllers by default.
|
600
|
+
It's view specific and can be easily included in controllers manually if someone
|
601
|
+
really needs it. Also deprecate calling `ActionController::RecordIdentifier.dom_id` and
|
602
|
+
`dom_class` directly, in favor of `ActionView::RecordIdentifier.dom_id` and `dom_class`.
|
603
|
+
`RecordIdentifier` will be removed from `ActionController::Base` in Rails 4.1.
|
507
604
|
|
508
|
-
*
|
605
|
+
*Piotr Sarnacki*
|
509
606
|
|
510
|
-
*
|
607
|
+
* Fix `ActionView::RecordIdentifier` to work as a singleton. *Piotr Sarnacki*
|
511
608
|
|
609
|
+
* Deprecate `Template#mime_type`, it will be removed in Rails 4.1 in favor of `#type`.
|
610
|
+
*Piotr Sarnacki*
|
512
611
|
|
513
|
-
|
612
|
+
* Move vendored html-scanner from `action_controller` to `action_view` directory. If you
|
613
|
+
require it directly, please use 'action_view/vendor/html-scanner', reference to
|
614
|
+
'action_controller/vendor/html-scanner' will be removed in Rails 4.1. *Piot Sarnacki*
|
514
615
|
|
515
|
-
*
|
616
|
+
* Fix handling of date selects when using both disabled and discard options.
|
617
|
+
Fixes #7431.
|
516
618
|
|
517
|
-
|
619
|
+
*Vasiliy Ermolovich*
|
518
620
|
|
519
|
-
*
|
621
|
+
* `ActiveRecord::SessionStore` is extracted out of Rails into a gem `activerecord-session_store`.
|
622
|
+
Setting `config.session_store` to `:active_record_store` will no longer work and will break
|
623
|
+
if the `activerecord-session_store` gem isn't available. *Prem Sichanugrist*
|
520
624
|
|
521
|
-
|
625
|
+
* Fix `select_tag` when `option_tags` is nil.
|
626
|
+
Fixes #7404.
|
522
627
|
|
523
|
-
*
|
628
|
+
*Sandeep Ravichandran*
|
524
629
|
|
525
|
-
*
|
630
|
+
* Add `Request#formats=(extensions)` that lets you set multiple formats directly in a prioritized order.
|
526
631
|
|
632
|
+
Example of using this for custom iphone views with an HTML fallback:
|
527
633
|
|
528
|
-
|
634
|
+
class ApplicationController < ActionController::Base
|
635
|
+
before_filter :adjust_format_for_iphone_with_html_fallback
|
529
636
|
|
530
|
-
|
637
|
+
private
|
638
|
+
def adjust_format_for_iphone_with_html_fallback
|
639
|
+
request.formats = [ :iphone, :html ] if request.env["HTTP_USER_AGENT"][/iPhone/]
|
640
|
+
end
|
641
|
+
end
|
531
642
|
|
643
|
+
*DHH*
|
532
644
|
|
533
|
-
|
645
|
+
* Add Routing Concerns to declare common routes that can be reused inside
|
646
|
+
others resources and routes.
|
534
647
|
|
535
|
-
|
648
|
+
Code before:
|
536
649
|
|
537
|
-
|
650
|
+
resources :messages do
|
651
|
+
resources :comments
|
652
|
+
end
|
538
653
|
|
539
|
-
|
654
|
+
resources :posts do
|
655
|
+
resources :comments
|
656
|
+
resources :images, only: :index
|
657
|
+
end
|
540
658
|
|
541
|
-
|
659
|
+
Code after:
|
542
660
|
|
543
|
-
|
661
|
+
concern :commentable do
|
662
|
+
resources :comments
|
663
|
+
end
|
544
664
|
|
545
|
-
|
665
|
+
concern :image_attachable do
|
666
|
+
resources :images, only: :index
|
667
|
+
end
|
546
668
|
|
547
|
-
|
669
|
+
resources :messages, concerns: :commentable
|
548
670
|
|
549
|
-
|
550
|
-
with regression from 16ee611fa
|
671
|
+
resources :posts, concerns: [:commentable, :image_attachable]
|
551
672
|
|
552
|
-
*
|
673
|
+
*DHH + Rafael Mendonça França*
|
553
674
|
|
554
|
-
*
|
675
|
+
* Add `start_hour` and `end_hour` options to the `select_hour` helper. *Evan Tann*
|
555
676
|
|
556
|
-
*
|
557
|
-
|
677
|
+
* Raises an `ArgumentError` when the first argument in `form_for` contain `nil`
|
678
|
+
or is empty.
|
558
679
|
|
680
|
+
*Richard Schneeman*
|
559
681
|
|
560
|
-
|
682
|
+
* Add 'X-Frame-Options' => 'SAMEORIGIN'
|
683
|
+
'X-XSS-Protection' => '1; mode=block' and
|
684
|
+
'X-Content-Type-Options' => 'nosniff'
|
685
|
+
as default headers.
|
561
686
|
|
562
|
-
*
|
687
|
+
*Egor Homakov*
|
563
688
|
|
564
|
-
*
|
689
|
+
* Allow data attributes to be set as a first-level option for `form_for`, so you can write `form_for @record, data: { behavior: 'autosave' }` instead of `form_for @record, html: { data: { behavior: 'autosave' } }` *DHH*
|
565
690
|
|
566
|
-
*
|
691
|
+
* Deprecate `button_to_function` and `link_to_function` helpers.
|
567
692
|
|
568
|
-
|
693
|
+
We recommend the use of Unobtrusive JavaScript instead. For example:
|
569
694
|
|
570
|
-
|
695
|
+
link_to "Greeting", "#", class: "nav_link"
|
571
696
|
|
572
|
-
|
697
|
+
$(function() {
|
698
|
+
$('.nav_link').click(function() {
|
699
|
+
// Some complex code
|
573
700
|
|
574
|
-
|
575
|
-
|
701
|
+
return false;
|
702
|
+
});
|
703
|
+
});
|
576
704
|
|
577
|
-
|
705
|
+
or
|
578
706
|
|
579
|
-
|
707
|
+
link_to "Greeting", '#', onclick: "alert('Hello world!'); return false", class: "nav_link"
|
580
708
|
|
581
|
-
|
709
|
+
for simple cases.
|
582
710
|
|
583
|
-
*
|
711
|
+
*Rafael Mendonça França*
|
584
712
|
|
585
|
-
*
|
713
|
+
* `javascript_include_tag :all` will now not include `application.js` if the file does not exists. *Prem Sichanugrist*
|
586
714
|
|
587
|
-
*
|
715
|
+
* Send an empty response body when call `head` with status between 100 and 199, 204, 205 or 304.
|
588
716
|
|
589
|
-
*
|
717
|
+
*Armand du Plessis*
|
590
718
|
|
719
|
+
* Fixed issue with where digest authentication would not work behind a proxy. *Arthur Smith*
|
591
720
|
|
592
|
-
|
721
|
+
* Added `ActionController::Live`. Mix it in to your controller and you can
|
722
|
+
stream data to the client live. For example:
|
593
723
|
|
594
|
-
|
724
|
+
class FooController < ActionController::Base
|
725
|
+
include ActionController::Live
|
595
726
|
|
596
|
-
|
727
|
+
def index
|
728
|
+
100.times {
|
729
|
+
# Client will see this as it's written
|
730
|
+
response.stream.write "hello world\n"
|
731
|
+
sleep 1
|
732
|
+
}
|
733
|
+
response.stream.close
|
734
|
+
end
|
735
|
+
end
|
597
736
|
|
598
|
-
*
|
737
|
+
*Aaron Patterson*
|
599
738
|
|
600
|
-
*
|
601
|
-
This is a behavior change, previously the hidden tag had a value of the disabled checkbox.
|
602
|
-
*Tadas Tamosauskas*
|
739
|
+
* Remove `ActionDispatch::Head` middleware in favor of `Rack::Head`. *Santiago Pastorino*
|
603
740
|
|
741
|
+
* Deprecate `:confirm` in favor of `data: { confirm: "Text" }` option for `button_to`, `button_tag`, `image_submit_tag`, `link_to` and `submit_tag` helpers.
|
604
742
|
|
605
|
-
|
743
|
+
*Carlos Galdino + Rafael Mendonça França*
|
606
744
|
|
607
|
-
*
|
745
|
+
* Show routes in exception page while debugging a `RoutingError` in development.
|
608
746
|
|
609
|
-
*
|
747
|
+
*Richard Schneeman + Mattt Thompson + Yves Senn*
|
610
748
|
|
611
|
-
* `
|
749
|
+
* Add `ActionController::Flash.add_flash_types` method to allow people to register their own flash types. e.g.:
|
612
750
|
|
751
|
+
class ApplicationController
|
752
|
+
add_flash_types :error, :warning
|
753
|
+
end
|
613
754
|
|
614
|
-
|
755
|
+
If you add the above code, you can use `<%= error %>` in an erb, and `redirect_to /foo, error: 'message'` in a controller.
|
615
756
|
|
616
|
-
*
|
757
|
+
*kennyj*
|
617
758
|
|
618
|
-
*
|
759
|
+
* Remove Active Model dependency from Action Pack. *Guillermo Iguaran*
|
619
760
|
|
620
|
-
*
|
761
|
+
* Support unicode characters in routes. Route will be automatically escaped, so instead of manually escaping:
|
621
762
|
|
622
|
-
|
763
|
+
get Rack::Utils.escape('こんにちは') => 'home#index'
|
623
764
|
|
624
|
-
|
765
|
+
You just have to write the unicode route:
|
625
766
|
|
626
|
-
|
767
|
+
get 'こんにちは' => 'home#index'
|
627
768
|
|
628
|
-
*
|
629
|
-
These methods were not being used internally anymore and are going to be removed in Rails 4. *Carlos Antonio da Silva*
|
769
|
+
*kennyj*
|
630
770
|
|
631
|
-
*
|
771
|
+
* Return proper format on exceptions. *Santiago Pastorino*
|
632
772
|
|
633
|
-
*
|
634
|
-
close. Closes #4441 if Active Record is disabled assets are delivered
|
635
|
-
correctly *Santiago Pastorino*
|
773
|
+
* Allow to use `mounted_helpers` (helpers for accessing mounted engines) in `ActionView::TestCase`. *Piotr Sarnacki*
|
636
774
|
|
637
|
-
*
|
775
|
+
* Include `mounted_helpers` (helpers for accessing mounted engines) in `ActionDispatch::IntegrationTest` by default. *Piotr Sarnacki*
|
638
776
|
|
639
|
-
*
|
777
|
+
* Extracted redirect logic from `ActionController::ForceSSL::ClassMethods.force_ssl` into `ActionController::ForceSSL#force_ssl_redirect`
|
640
778
|
|
641
|
-
*
|
779
|
+
*Jeremy Friesen*
|
642
780
|
|
643
|
-
*
|
781
|
+
* Make possible to use a block in `button_to` if the button text is hard
|
782
|
+
to fit into the name parameter, e.g.:
|
644
783
|
|
645
|
-
|
784
|
+
<%= button_to [:make_happy, @user] do %>
|
785
|
+
Make happy <strong><%= @user.name %></strong>
|
786
|
+
<% end %>
|
787
|
+
# => "<form method="post" action="/users/1/make_happy" class="button_to">
|
788
|
+
# <div>
|
789
|
+
# <button type="submit">
|
790
|
+
# Make happy <strong>Name</strong>
|
791
|
+
# </button>
|
792
|
+
# </div>
|
793
|
+
# </form>"
|
646
794
|
|
647
|
-
*
|
795
|
+
*Sergey Nartimov*
|
648
796
|
|
649
|
-
|
797
|
+
* Change a way of ordering helpers from several directories. Previously,
|
798
|
+
when loading helpers from multiple paths, all of the helpers files were
|
799
|
+
gathered into one array an then they were sorted. Helpers from different
|
800
|
+
directories should not be mixed before loading them to make loading more
|
801
|
+
predictable. The most common use case for such behavior is loading helpers
|
802
|
+
from engines. When you load helpers from application and engine Foo, in
|
803
|
+
that order, first rails will load all of the helpers from application,
|
804
|
+
sorted alphabetically and then it will do the same for Foo engine.
|
650
805
|
|
651
|
-
|
806
|
+
*Piotr Sarnacki*
|
652
807
|
|
653
|
-
|
654
|
-
|
655
|
-
<% end %>
|
808
|
+
* `truncate` now always returns an escaped HTML-safe string. The option `:escape` can be used as
|
809
|
+
false to not escape the result.
|
656
810
|
|
657
|
-
*
|
658
|
-
For example, this is useful for displaying ISO8601-style dates such as '2011-08-01'. *Lennart Fridén and Kim Persson*
|
811
|
+
*Li Ellis Gallardo + Rafael Mendonça França*
|
659
812
|
|
660
|
-
*
|
813
|
+
* `truncate` now accepts a block to show extra content when the text is truncated. *Li Ellis Gallardo*
|
661
814
|
|
662
|
-
*
|
815
|
+
* Add `week_field`, `week_field_tag`, `month_field`, `month_field_tag`, `datetime_local_field`,
|
816
|
+
`datetime_local_field_tag`, `datetime_field` and `datetime_field_tag` helpers. *Carlos Galdino*
|
663
817
|
|
664
|
-
|
665
|
-
layout "application"
|
666
|
-
end
|
818
|
+
* Add `color_field` and `color_field_tag` helpers. *Carlos Galdino*
|
667
819
|
|
668
|
-
|
669
|
-
|
820
|
+
* `assert_generates`, `assert_recognizes`, and `assert_routing` all raise
|
821
|
+
`Assertion` instead of `RoutingError` *David Chelimsky*
|
670
822
|
|
671
|
-
|
823
|
+
* URL path parameters with invalid encoding now raise `ActionController::BadRequest`. *Andrew White*
|
672
824
|
|
673
|
-
|
825
|
+
* Malformed query and request parameter hashes now raise `ActionController::BadRequest`. *Andrew White*
|
674
826
|
|
675
|
-
*
|
827
|
+
* Add `divider` option to `grouped_options_for_select` to generate a separator
|
828
|
+
`optgroup` automatically, and deprecate `prompt` as third argument, in favor
|
829
|
+
of using an options hash. *Nicholas Greenfield*
|
676
830
|
|
677
|
-
|
831
|
+
* Add `time_field` and `time_field_tag` helpers which render an `input[type="time"]` tag. *Alex Soulim*
|
678
832
|
|
679
|
-
|
680
|
-
layout 'single_car', :only => :show
|
681
|
-
end
|
833
|
+
* Removed old text helper apis from `highlight`, `excerpt` and `word_wrap`. *Jeremy Walker*
|
682
834
|
|
683
|
-
|
835
|
+
* Templates without a handler extension now raises a deprecation warning but still
|
836
|
+
defaults to ERB. In future releases, it will simply return the template contents. *Steve Klabnik*
|
684
837
|
|
685
|
-
*
|
838
|
+
* Deprecate `:disable_with` in favor of `data: { disable_with: "Text" }` option from `submit_tag`, `button_tag` and `button_to` helpers.
|
686
839
|
|
687
|
-
|
840
|
+
*Carlos Galdino + Rafael Mendonça França*
|
688
841
|
|
689
|
-
|
842
|
+
* Remove `:mouseover` option from `image_tag` helper. *Rafael Mendonça França*
|
690
843
|
|
691
|
-
|
844
|
+
* The `select` method (select tag) forces `:include_blank` if `required` is true and
|
845
|
+
`display size` is one and `multiple` is not true. *Angelo Capilleri*
|
692
846
|
|
693
|
-
|
847
|
+
* Copy literal route constraints to defaults so that url generation know about them.
|
848
|
+
The copied constraints are `:protocol`, `:subdomain`, `:domain`, `:host` and `:port`.
|
694
849
|
|
695
|
-
*
|
850
|
+
*Andrew White*
|
696
851
|
|
697
|
-
*
|
852
|
+
* `respond_to` and `respond_with` now raise `ActionController::UnknownFormat` instead
|
853
|
+
of directly returning head 406. The exception is rescued and converted to 406
|
854
|
+
in the exception handling middleware. *Steven Soroka*
|
698
855
|
|
699
|
-
*
|
856
|
+
* Allows `assert_redirected_to` to match against a regular expression. *Andy Lindeman*
|
700
857
|
|
701
|
-
*
|
858
|
+
* Add backtrace to development routing error page. *Richard Schneeman*
|
702
859
|
|
703
|
-
*
|
860
|
+
* Replace `include_seconds` boolean argument with `include_seconds: true` option
|
861
|
+
in `distance_of_time_in_words` and `time_ago_in_words` signature. *Dmitriy Kiriyenko*
|
704
862
|
|
705
|
-
*
|
706
|
-
|
863
|
+
* Make current object and counter (when it applies) variables accessible when
|
864
|
+
rendering templates with :object / :collection. *Carlos Antonio da Silva*
|
707
865
|
|
708
|
-
|
866
|
+
* JSONP now uses mimetype `text/javascript` instead of `application/json`. *omjokine*
|
709
867
|
|
710
|
-
|
711
|
-
<%= f.label :version, 'Version' %>:
|
712
|
-
<%= f.text_field :version %>
|
713
|
-
<% end %>
|
868
|
+
* Allow to lazy load `default_form_builder` by passing a `String` instead of a constant. *Piotr Sarnacki*
|
714
869
|
|
715
|
-
*
|
870
|
+
* Session arguments passed to `process` calls in functional tests are now merged into
|
871
|
+
the existing session, whereas previously they would replace the existing session.
|
872
|
+
This change may break some existing tests if they are asserting the exact contents of
|
873
|
+
the session but should not break existing tests that only assert individual keys.
|
716
874
|
|
717
|
-
|
875
|
+
*Andrew White*
|
718
876
|
|
719
|
-
*
|
877
|
+
* Add `index` method to FormBuilder class. *Jorge Bejar*
|
720
878
|
|
721
|
-
*
|
879
|
+
* Remove the leading \n added by textarea on `assert_select`. *Santiago Pastorino*
|
722
880
|
|
723
|
-
*
|
881
|
+
* Changed default value for `config.action_view.embed_authenticity_token_in_remote_forms`
|
882
|
+
to `false`. This change breaks remote forms that need to work also without JavaScript,
|
883
|
+
so if you need such behavior, you can either set it to `true` or explicitly pass
|
884
|
+
`authenticity_token: true` in form options.
|
724
885
|
|
725
|
-
|
886
|
+
* Added `ActionDispatch::SSL` middleware that when included force all the requests to be under HTTPS protocol. *Rafael Mendonça França*
|
726
887
|
|
727
|
-
|
888
|
+
* Add `include_hidden` option to select tag. With `include_hidden: false` select with `multiple` attribute doesn't generate hidden input with blank value. *Vasiliy Ermolovich*
|
728
889
|
|
729
|
-
*
|
890
|
+
* Removed default `size` option from the `text_field`, `search_field`, `telephone_field`, `url_field`, `email_field` helpers. *Philip Arndt*
|
730
891
|
|
731
|
-
|
892
|
+
* Removed default `cols` and `rows` options from the `text_area` helper. *Philip Arndt*
|
732
893
|
|
733
|
-
|
734
|
-
render :template => "foo", :formats => [:html, :js], :handlers => :erb
|
894
|
+
* Adds support for layouts when rendering a partial with a given collection. *serabe*
|
735
895
|
|
736
|
-
*
|
896
|
+
* Allows the route helper `root` to take a string argument. For example, `root 'pages#main'`. *bcardarella*
|
737
897
|
|
738
|
-
*
|
898
|
+
* Forms of persisted records use always PATCH (via the `_method` hack). *fxn*
|
739
899
|
|
740
|
-
|
900
|
+
* For resources, both PATCH and PUT are routed to the `update` action. *fxn*
|
741
901
|
|
742
|
-
|
743
|
-
|
744
|
-
|
902
|
+
* Don't ignore `force_ssl` in development. This is a change of behavior - use a `:if` condition to recreate the old behavior.
|
903
|
+
|
904
|
+
class AccountsController < ApplicationController
|
905
|
+
force_ssl if: :ssl_configured?
|
906
|
+
|
907
|
+
def ssl_configured?
|
908
|
+
!Rails.env.development?
|
745
909
|
end
|
746
910
|
end
|
747
911
|
|
748
|
-
|
912
|
+
*Pat Allan*
|
749
913
|
|
750
|
-
|
751
|
-
|
752
|
-
|
914
|
+
* Adds support for the PATCH verb:
|
915
|
+
* Request objects respond to `patch?`.
|
916
|
+
* Routes have a new `patch` method, and understand `:patch` in the
|
917
|
+
existing places where a verb is configured, like `:via`.
|
918
|
+
* New method `patch` available in functional tests.
|
919
|
+
* If `:patch` is the default verb for updates, edits are
|
920
|
+
tunneled as PATCH rather than as PUT, and routing acts accordingly.
|
921
|
+
* New method `patch_via_redirect` available in integration tests.
|
922
|
+
|
923
|
+
*dlee*
|
924
|
+
|
925
|
+
* Integration tests support the `OPTIONS` method. *Jeremy Kemper*
|
926
|
+
|
927
|
+
* `expires_in` accepts a `must_revalidate` flag. If true, "must-revalidate"
|
928
|
+
is added to the Cache-Control header. *fxn*
|
929
|
+
|
930
|
+
* Add `date_field` and `date_field_tag` helpers which render an `input[type="date"]` tag *Olek Janiszewski*
|
931
|
+
|
932
|
+
* Adds `image_url`, `javascript_url`, `stylesheet_url`, `audio_url`, `video_url`, and `font_url`
|
933
|
+
to assets tag helper. These URL helpers will return the full path to your assets. This is useful
|
934
|
+
when you are going to reference this asset from external host. *Prem Sichanugrist*
|
935
|
+
|
936
|
+
* Default responder will now always use your overridden block in `respond_with` to render your response. *Prem Sichanugrist*
|
937
|
+
|
938
|
+
* Allow `value_method` and `text_method` arguments from `collection_select` and
|
939
|
+
`options_from_collection_for_select` to receive an object that responds to `:call`,
|
940
|
+
such as a `proc`, to evaluate the option in the current element context. This works
|
941
|
+
the same way with `collection_radio_buttons` and `collection_check_boxes`.
|
942
|
+
|
943
|
+
*Carlos Antonio da Silva + Rafael Mendonça França*
|
944
|
+
|
945
|
+
* Add `collection_check_boxes` form helper, similar to `collection_select`:
|
946
|
+
Example:
|
947
|
+
|
948
|
+
collection_check_boxes :post, :author_ids, Author.all, :id, :name
|
949
|
+
# Outputs something like:
|
950
|
+
<input id="post_author_ids_1" name="post[author_ids][]" type="checkbox" value="1" />
|
951
|
+
<label for="post_author_ids_1">D. Heinemeier Hansson</label>
|
952
|
+
<input id="post_author_ids_2" name="post[author_ids][]" type="checkbox" value="2" />
|
953
|
+
<label for="post_author_ids_2">D. Thomas</label>
|
954
|
+
<input name="post[author_ids][]" type="hidden" value="" />
|
955
|
+
|
956
|
+
The label/check_box pairs can be customized with a block.
|
957
|
+
|
958
|
+
*Carlos Antonio da Silva + Rafael Mendonça França*
|
959
|
+
|
960
|
+
* Add `collection_radio_buttons` form helper, similar to `collection_select`:
|
961
|
+
Example:
|
962
|
+
|
963
|
+
collection_radio_buttons :post, :author_id, Author.all, :id, :name
|
964
|
+
# Outputs something like:
|
965
|
+
<input id="post_author_id_1" name="post[author_id]" type="radio" value="1" />
|
966
|
+
<label for="post_author_id_1">D. Heinemeier Hansson</label>
|
967
|
+
<input id="post_author_id_2" name="post[author_id]" type="radio" value="2" />
|
968
|
+
<label for="post_author_id_2">D. Thomas</label>
|
969
|
+
|
970
|
+
The label/radio_button pairs can be customized with a block.
|
971
|
+
|
972
|
+
*Carlos Antonio da Silva + Rafael Mendonça França*
|
973
|
+
|
974
|
+
* `check_box` with `:form` html5 attribute will now replicate the `:form`
|
975
|
+
attribute to the hidden field as well. *Carlos Antonio da Silva*
|
976
|
+
|
977
|
+
* `label` form helper accepts `for: nil` to not generate the attribute. *Carlos Antonio da Silva*
|
978
|
+
|
979
|
+
* Add `:format` option to `number_to_percentage`. *Rodrigo Flores*
|
980
|
+
|
981
|
+
* Add `config.action_view.logger` to configure logger for Action View. *Rafael Mendonça França*
|
982
|
+
|
983
|
+
* Deprecated `ActionController::Integration` in favour of `ActionDispatch::Integration`.
|
753
984
|
|
754
|
-
*
|
985
|
+
* Deprecated `ActionController::IntegrationTest` in favour of `ActionDispatch::IntegrationTest`.
|
755
986
|
|
756
|
-
*
|
987
|
+
* Deprecated `ActionController::PerformanceTest` in favour of `ActionDispatch::PerformanceTest`.
|
757
988
|
|
758
|
-
*
|
759
|
-
This is useful when you rely on the fact that when no options is set,
|
760
|
-
the state of select will be sent to rails application. Without hidden field
|
761
|
-
nothing is sent according to HTML spec *Bogdan Gusiev*
|
989
|
+
* Deprecated `ActionController::AbstractRequest` in favour of `ActionDispatch::Request`.
|
762
990
|
|
763
|
-
*
|
991
|
+
* Deprecated `ActionController::Request` in favour of `ActionDispatch::Request`.
|
764
992
|
|
765
|
-
|
993
|
+
* Deprecated `ActionController::AbstractResponse` in favour of `ActionDispatch::Response`.
|
766
994
|
|
767
|
-
|
768
|
-
get :index
|
769
|
-
assert_equal 'user@example.com', cookies[:email]
|
995
|
+
* Deprecated `ActionController::Response` in favour of `ActionDispatch::Response`.
|
770
996
|
|
771
|
-
|
997
|
+
* Deprecated `ActionController::Routing` in favour of `ActionDispatch::Routing`.
|
772
998
|
|
773
|
-
|
774
|
-
|
775
|
-
|
999
|
+
* `check_box helper` with `disabled: true` will generate a disabled
|
1000
|
+
hidden field to conform with the HTML convention where disabled fields are
|
1001
|
+
not submitted with the form. This is a behavior change, previously the hidden
|
1002
|
+
tag had a value of the disabled checkbox. *Tadas Tamosauskas*
|
776
1003
|
|
777
|
-
|
778
|
-
persistent between requests so if you need to manipulate the environment
|
779
|
-
for your test you need to do it before the cookie jar is created.
|
1004
|
+
* `favicon_link_tag` helper will now use the favicon in app/assets by default. *Lucas Caton*
|
780
1005
|
|
781
|
-
*
|
782
|
-
|
783
|
-
returned by the class method attribute_names will be wrapped. This fixes
|
784
|
-
the wrapping of nested attributes by adding them to attr_accessible.
|
1006
|
+
* `ActionView::Helpers::TextHelper#highlight` now defaults to the
|
1007
|
+
HTML5 `mark` element. *Brian Cardarella*
|
785
1008
|
|
786
|
-
Please check [3-
|
1009
|
+
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/actionpack/CHANGELOG.md) for previous changes.
|