actionpack 1.13.6 → 2.0.0

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.

Files changed (317) hide show
  1. data/CHANGELOG +1400 -20
  2. data/MIT-LICENSE +1 -1
  3. data/README +5 -5
  4. data/RUNNING_UNIT_TESTS +4 -5
  5. data/Rakefile +5 -6
  6. data/install.rb +2 -2
  7. data/lib/action_controller.rb +11 -15
  8. data/lib/action_controller/assertions.rb +12 -25
  9. data/lib/action_controller/assertions/dom_assertions.rb +18 -4
  10. data/lib/action_controller/assertions/model_assertions.rb +8 -1
  11. data/lib/action_controller/assertions/response_assertions.rb +35 -12
  12. data/lib/action_controller/assertions/routing_assertions.rb +56 -12
  13. data/lib/action_controller/assertions/selector_assertions.rb +105 -38
  14. data/lib/action_controller/assertions/tag_assertions.rb +28 -15
  15. data/lib/action_controller/base.rb +318 -250
  16. data/lib/action_controller/benchmarking.rb +33 -29
  17. data/lib/action_controller/caching.rb +130 -64
  18. data/lib/action_controller/cgi_ext.rb +16 -0
  19. data/lib/action_controller/cgi_ext/{cookie_performance_fix.rb → cookie.rb} +25 -40
  20. data/lib/action_controller/cgi_ext/query_extension.rb +22 -0
  21. data/lib/action_controller/cgi_ext/session.rb +73 -0
  22. data/lib/action_controller/cgi_ext/stdinput.rb +23 -0
  23. data/lib/action_controller/cgi_process.rb +34 -57
  24. data/lib/action_controller/components.rb +19 -36
  25. data/lib/action_controller/cookies.rb +10 -9
  26. data/lib/action_controller/dispatcher.rb +195 -0
  27. data/lib/action_controller/filters.rb +35 -34
  28. data/lib/action_controller/flash.rb +30 -35
  29. data/lib/action_controller/helpers.rb +121 -47
  30. data/lib/action_controller/http_authentication.rb +126 -0
  31. data/lib/action_controller/integration.rb +105 -101
  32. data/lib/action_controller/layout.rb +59 -47
  33. data/lib/action_controller/mime_responds.rb +57 -68
  34. data/lib/action_controller/mime_type.rb +43 -80
  35. data/lib/action_controller/mime_types.rb +20 -0
  36. data/lib/action_controller/polymorphic_routes.rb +88 -0
  37. data/lib/action_controller/record_identifier.rb +91 -0
  38. data/lib/action_controller/request.rb +553 -88
  39. data/lib/action_controller/request_forgery_protection.rb +126 -0
  40. data/lib/action_controller/request_profiler.rb +138 -0
  41. data/lib/action_controller/rescue.rb +185 -69
  42. data/lib/action_controller/resources.rb +211 -172
  43. data/lib/action_controller/response.rb +49 -8
  44. data/lib/action_controller/routing.rb +359 -236
  45. data/lib/action_controller/routing_optimisation.rb +119 -0
  46. data/lib/action_controller/session/active_record_store.rb +3 -2
  47. data/lib/action_controller/session/cookie_store.rb +161 -0
  48. data/lib/action_controller/session/mem_cache_store.rb +9 -16
  49. data/lib/action_controller/session_management.rb +17 -8
  50. data/lib/action_controller/streaming.rb +6 -3
  51. data/lib/action_controller/templates/rescues/_request_and_response.erb +24 -0
  52. data/lib/action_controller/templates/rescues/{_trace.rhtml → _trace.erb} +0 -0
  53. data/lib/action_controller/templates/rescues/{diagnostics.rhtml → diagnostics.erb} +2 -2
  54. data/lib/action_controller/templates/rescues/{layout.rhtml → layout.erb} +0 -0
  55. data/lib/action_controller/templates/rescues/{missing_template.rhtml → missing_template.erb} +0 -0
  56. data/lib/action_controller/templates/rescues/{routing_error.rhtml → routing_error.erb} +0 -0
  57. data/lib/action_controller/templates/rescues/{template_error.rhtml → template_error.erb} +2 -2
  58. data/lib/action_controller/templates/rescues/{unknown_action.rhtml → unknown_action.erb} +0 -0
  59. data/lib/action_controller/test_case.rb +53 -0
  60. data/lib/action_controller/test_process.rb +59 -46
  61. data/lib/action_controller/url_rewriter.rb +48 -24
  62. data/lib/action_controller/vendor/html-scanner/html/document.rb +7 -4
  63. data/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +173 -0
  64. data/lib/action_controller/vendor/html-scanner/html/selector.rb +11 -6
  65. data/lib/action_controller/verification.rb +27 -21
  66. data/lib/action_pack.rb +1 -1
  67. data/lib/action_pack/version.rb +4 -4
  68. data/lib/action_view.rb +2 -3
  69. data/lib/action_view/base.rb +218 -63
  70. data/lib/action_view/compiled_templates.rb +1 -2
  71. data/lib/action_view/helpers/active_record_helper.rb +35 -17
  72. data/lib/action_view/helpers/asset_tag_helper.rb +395 -87
  73. data/lib/action_view/helpers/atom_feed_helper.rb +111 -0
  74. data/lib/action_view/helpers/benchmark_helper.rb +12 -5
  75. data/lib/action_view/helpers/cache_helper.rb +29 -0
  76. data/lib/action_view/helpers/capture_helper.rb +97 -63
  77. data/lib/action_view/helpers/date_helper.rb +295 -35
  78. data/lib/action_view/helpers/debug_helper.rb +6 -2
  79. data/lib/action_view/helpers/form_helper.rb +354 -111
  80. data/lib/action_view/helpers/form_options_helper.rb +171 -109
  81. data/lib/action_view/helpers/form_tag_helper.rb +332 -76
  82. data/lib/action_view/helpers/javascript_helper.rb +35 -11
  83. data/lib/action_view/helpers/javascripts/controls.js +484 -354
  84. data/lib/action_view/helpers/javascripts/dragdrop.js +88 -58
  85. data/lib/action_view/helpers/javascripts/effects.js +396 -364
  86. data/lib/action_view/helpers/javascripts/prototype.js +2817 -1107
  87. data/lib/action_view/helpers/number_helper.rb +84 -60
  88. data/lib/action_view/helpers/prototype_helper.rb +419 -43
  89. data/lib/action_view/helpers/record_identification_helper.rb +20 -0
  90. data/lib/action_view/helpers/record_tag_helper.rb +59 -0
  91. data/lib/action_view/helpers/sanitize_helper.rb +223 -0
  92. data/lib/action_view/helpers/scriptaculous_helper.rb +63 -4
  93. data/lib/action_view/helpers/tag_helper.rb +69 -39
  94. data/lib/action_view/helpers/text_helper.rb +221 -148
  95. data/lib/action_view/helpers/url_helper.rb +283 -165
  96. data/lib/action_view/partials.rb +134 -62
  97. data/lib/action_view/template_error.rb +4 -12
  98. data/lib/actionpack.rb +1 -0
  99. data/test/abstract_unit.rb +21 -1
  100. data/test/action_view_test.rb +26 -0
  101. data/test/active_record_unit.rb +12 -20
  102. data/test/activerecord/active_record_store_test.rb +2 -2
  103. data/test/activerecord/render_partial_with_record_identification_test.rb +74 -0
  104. data/test/controller/action_pack_assertions_test.rb +21 -152
  105. data/test/controller/addresses_render_test.rb +2 -7
  106. data/test/controller/assert_select_test.rb +120 -14
  107. data/test/controller/base_test.rb +11 -13
  108. data/test/controller/caching_test.rb +125 -5
  109. data/test/controller/capture_test.rb +23 -16
  110. data/test/controller/cgi_test.rb +66 -391
  111. data/test/controller/components_test.rb +31 -42
  112. data/test/controller/content_type_test.rb +1 -1
  113. data/test/controller/cookie_test.rb +42 -14
  114. data/test/controller/deprecation/deprecated_base_methods_test.rb +1 -42
  115. data/test/controller/dispatcher_test.rb +123 -0
  116. data/test/controller/fake_models.rb +5 -0
  117. data/test/controller/filters_test.rb +44 -7
  118. data/test/controller/flash_test.rb +46 -2
  119. data/test/controller/fragment_store_setting_test.rb +10 -8
  120. data/test/controller/helper_test.rb +19 -2
  121. data/test/controller/html-scanner/document_test.rb +124 -0
  122. data/test/controller/html-scanner/node_test.rb +69 -0
  123. data/test/controller/html-scanner/sanitizer_test.rb +250 -0
  124. data/test/controller/html-scanner/tag_node_test.rb +239 -0
  125. data/test/controller/html-scanner/text_node_test.rb +51 -0
  126. data/test/controller/html-scanner/tokenizer_test.rb +125 -0
  127. data/test/controller/http_authentication_test.rb +54 -0
  128. data/test/controller/integration_test.rb +12 -26
  129. data/test/controller/layout_test.rb +64 -12
  130. data/test/controller/mime_responds_test.rb +193 -38
  131. data/test/controller/mime_type_test.rb +30 -8
  132. data/test/controller/new_render_test.rb +104 -22
  133. data/test/controller/polymorphic_routes_test.rb +98 -0
  134. data/test/controller/record_identifier_test.rb +103 -0
  135. data/test/controller/redirect_test.rb +120 -18
  136. data/test/controller/render_test.rb +195 -45
  137. data/test/controller/request_forgery_protection_test.rb +217 -0
  138. data/test/controller/request_test.rb +545 -27
  139. data/test/controller/rescue_test.rb +501 -0
  140. data/test/controller/resources_test.rb +258 -132
  141. data/test/controller/routing_test.rb +502 -106
  142. data/test/controller/selector_test.rb +5 -5
  143. data/test/controller/send_file_test.rb +17 -7
  144. data/test/controller/session/cookie_store_test.rb +246 -0
  145. data/test/controller/session/mem_cache_store_test.rb +182 -0
  146. data/test/controller/session_fixation_test.rb +8 -11
  147. data/test/controller/session_management_test.rb +7 -7
  148. data/test/controller/test_test.rb +150 -38
  149. data/test/controller/url_rewriter_test.rb +87 -12
  150. data/test/controller/verification_test.rb +11 -0
  151. data/test/controller/view_paths_test.rb +137 -0
  152. data/test/controller/webservice_test.rb +11 -75
  153. data/test/fixtures/addresses/{list.rhtml → list.erb} +0 -0
  154. data/test/fixtures/db_definitions/sqlite.sql +2 -1
  155. data/test/fixtures/developer.rb +2 -0
  156. data/test/fixtures/fun/games/{hello_world.rhtml → hello_world.erb} +0 -0
  157. data/test/fixtures/helpers/fun/pdf_helper.rb +1 -1
  158. data/test/fixtures/layout_tests/alt/hello.rhtml +1 -0
  159. data/test/fixtures/layout_tests/layouts/multiple_extensions.html.erb +1 -0
  160. data/test/fixtures/layouts/{builder.rxml → builder.builder} +0 -0
  161. data/test/fixtures/layouts/{standard.rhtml → standard.erb} +0 -0
  162. data/test/fixtures/layouts/{talk_from_action.rhtml → talk_from_action.erb} +0 -0
  163. data/test/fixtures/layouts/{yield.rhtml → yield.erb} +0 -0
  164. data/test/fixtures/multipart/binary_file +0 -0
  165. data/test/fixtures/multipart/bracketed_param +5 -0
  166. data/test/fixtures/override/test/hello_world.erb +1 -0
  167. data/test/fixtures/override2/layouts/test/sub.erb +1 -0
  168. data/test/fixtures/post_test/layouts/post.html.erb +1 -0
  169. data/test/fixtures/post_test/layouts/super_post.iphone.erb +1 -0
  170. data/test/fixtures/post_test/post/index.html.erb +1 -0
  171. data/test/fixtures/post_test/post/index.iphone.erb +1 -0
  172. data/test/fixtures/post_test/super_post/index.html.erb +1 -0
  173. data/test/fixtures/post_test/super_post/index.iphone.erb +1 -0
  174. data/test/fixtures/public/404.html +1 -0
  175. data/test/fixtures/public/500.html +1 -0
  176. data/test/fixtures/public/javascripts/application.js +0 -1
  177. data/test/fixtures/public/javascripts/bank.js +1 -0
  178. data/test/fixtures/public/javascripts/robber.js +1 -0
  179. data/test/fixtures/public/stylesheets/bank.css +1 -0
  180. data/test/fixtures/public/stylesheets/robber.css +1 -0
  181. data/test/fixtures/replies.yml +2 -0
  182. data/test/fixtures/reply.rb +2 -1
  183. data/test/fixtures/respond_to/{all_types_with_layout.rhtml → all_types_with_layout.html.erb} +0 -0
  184. data/test/fixtures/respond_to/{all_types_with_layout.rjs → all_types_with_layout.js.rjs} +0 -0
  185. data/test/fixtures/respond_to/custom_constant_handling_without_block.mobile.erb +1 -0
  186. data/test/fixtures/respond_to/iphone_with_html_response_type.html.erb +1 -0
  187. data/test/fixtures/respond_to/iphone_with_html_response_type.iphone.erb +1 -0
  188. data/test/fixtures/respond_to/layouts/missing.html.erb +1 -0
  189. data/test/fixtures/respond_to/layouts/standard.html.erb +1 -0
  190. data/test/fixtures/respond_to/layouts/standard.iphone.erb +1 -0
  191. data/test/fixtures/respond_to/{using_defaults.rhtml → using_defaults.html.erb} +0 -0
  192. data/test/fixtures/respond_to/{using_defaults.rjs → using_defaults.js.rjs} +0 -0
  193. data/test/fixtures/respond_to/{using_defaults.rxml → using_defaults.xml.builder} +0 -0
  194. data/test/fixtures/respond_to/{using_defaults_with_type_list.rhtml → using_defaults_with_type_list.html.erb} +0 -0
  195. data/test/fixtures/respond_to/{using_defaults_with_type_list.rjs → using_defaults_with_type_list.js.rjs} +0 -0
  196. data/test/fixtures/respond_to/{using_defaults_with_type_list.rxml → using_defaults_with_type_list.xml.builder} +0 -0
  197. data/test/fixtures/scope/test/{modgreet.rhtml → modgreet.erb} +0 -0
  198. data/test/fixtures/test/{_customer.rhtml → _customer.erb} +0 -0
  199. data/test/fixtures/test/{_customer_greeting.rhtml → _customer_greeting.erb} +0 -0
  200. data/test/fixtures/test/_hash_greeting.erb +1 -0
  201. data/test/fixtures/test/_hash_object.erb +2 -0
  202. data/test/fixtures/test/{_hello.rxml → _hello.builder} +0 -0
  203. data/test/fixtures/test/_layout_for_partial.html.erb +3 -0
  204. data/test/fixtures/test/_partial.erb +1 -0
  205. data/test/fixtures/test/_partial.html.erb +1 -0
  206. data/test/fixtures/test/_partial.js.erb +1 -0
  207. data/test/fixtures/test/_partial_for_use_in_layout.html.erb +1 -0
  208. data/test/fixtures/test/{_partial_only.rhtml → _partial_only.erb} +0 -0
  209. data/test/fixtures/test/{_person.rhtml → _person.erb} +0 -0
  210. data/test/fixtures/test/{action_talk_to_layout.rhtml → action_talk_to_layout.erb} +0 -0
  211. data/test/fixtures/test/{block_content_for.rhtml → block_content_for.erb} +0 -0
  212. data/test/fixtures/test/calling_partial_with_layout.html.erb +1 -0
  213. data/test/fixtures/test/{capturing.rhtml → capturing.erb} +0 -0
  214. data/test/fixtures/test/{content_for.rhtml → content_for.erb} +0 -0
  215. data/test/fixtures/test/content_for_concatenated.erb +3 -0
  216. data/test/fixtures/test/content_for_with_parameter.erb +2 -0
  217. data/test/fixtures/test/dot.directory/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
  218. data/test/fixtures/test/{erb_content_for.rhtml → erb_content_for.erb} +0 -0
  219. data/test/fixtures/test/formatted_html_erb.html.erb +1 -0
  220. data/test/fixtures/test/formatted_xml_erb.builder +1 -0
  221. data/test/fixtures/test/formatted_xml_erb.html.erb +1 -0
  222. data/test/fixtures/test/formatted_xml_erb.xml.erb +1 -0
  223. data/test/fixtures/test/{greeting.rhtml → greeting.erb} +0 -0
  224. data/test/fixtures/test/{hello.rxml → hello.builder} +0 -0
  225. data/test/fixtures/test/{hello_world.rxml → hello_world.builder} +0 -0
  226. data/test/fixtures/test/{hello_world.rhtml → hello_world.erb} +0 -0
  227. data/test/fixtures/test/{hello_world_container.rxml → hello_world_container.builder} +0 -0
  228. data/test/fixtures/test/{hello_world_with_layout_false.rhtml → hello_world_with_layout_false.erb} +0 -0
  229. data/test/fixtures/test/{hello_xml_world.rxml → hello_xml_world.builder} +0 -0
  230. data/test/fixtures/test/list.erb +1 -0
  231. data/test/fixtures/test/{non_erb_block_content_for.rxml → non_erb_block_content_for.builder} +0 -0
  232. data/test/fixtures/test/{potential_conflicts.rhtml → potential_conflicts.erb} +0 -0
  233. data/test/fixtures/test/{render_file_with_ivar.rhtml → render_file_with_ivar.erb} +0 -0
  234. data/test/fixtures/test/{render_file_with_locals.rhtml → render_file_with_locals.erb} +0 -0
  235. data/test/fixtures/test/{render_to_string_test.rhtml → render_to_string_test.erb} +0 -0
  236. data/test/fixtures/test/{update_element_with_capture.rhtml → update_element_with_capture.erb} +0 -0
  237. data/test/fixtures/test/using_layout_around_block.html.erb +1 -0
  238. data/test/fixtures/topic.rb +1 -1
  239. data/test/template/active_record_helper_test.rb +67 -20
  240. data/test/template/asset_tag_helper_test.rb +222 -54
  241. data/test/template/atom_feed_helper_test.rb +101 -0
  242. data/test/template/benchmark_helper_test.rb +2 -2
  243. data/test/template/compiled_templates_test.rb +76 -32
  244. data/test/template/date_helper_test.rb +125 -9
  245. data/test/template/form_helper_test.rb +326 -33
  246. data/test/template/form_options_helper_test.rb +822 -15
  247. data/test/template/form_tag_helper_test.rb +96 -30
  248. data/test/template/javascript_helper_test.rb +61 -13
  249. data/test/template/number_helper_test.rb +12 -11
  250. data/test/template/prototype_helper_test.rb +185 -24
  251. data/test/template/sanitize_helper_test.rb +49 -0
  252. data/test/template/scriptaculous_helper_test.rb +9 -3
  253. data/test/template/tag_helper_test.rb +13 -2
  254. data/test/template/text_helper_test.rb +38 -52
  255. data/test/template/url_helper_test.rb +216 -46
  256. metadata +144 -116
  257. data/examples/.htaccess +0 -24
  258. data/examples/address_book/index.rhtml +0 -33
  259. data/examples/address_book/layout.rhtml +0 -8
  260. data/examples/address_book_controller.cgi +0 -9
  261. data/examples/address_book_controller.fcgi +0 -6
  262. data/examples/address_book_controller.rb +0 -52
  263. data/examples/address_book_controller.rbx +0 -4
  264. data/examples/benchmark.rb +0 -52
  265. data/examples/benchmark_with_ar.fcgi +0 -89
  266. data/examples/blog_controller.cgi +0 -53
  267. data/examples/debate/index.rhtml +0 -14
  268. data/examples/debate/new_topic.rhtml +0 -22
  269. data/examples/debate/topic.rhtml +0 -32
  270. data/examples/debate_controller.cgi +0 -57
  271. data/lib/action_controller/assertions/deprecated_assertions.rb +0 -228
  272. data/lib/action_controller/cgi_ext/cgi_ext.rb +0 -36
  273. data/lib/action_controller/cgi_ext/cgi_methods.rb +0 -211
  274. data/lib/action_controller/cgi_ext/pstore_performance_fix.rb +0 -30
  275. data/lib/action_controller/cgi_ext/raw_post_data_fix.rb +0 -95
  276. data/lib/action_controller/cgi_ext/session_performance_fix.rb +0 -30
  277. data/lib/action_controller/deprecated_dependencies.rb +0 -65
  278. data/lib/action_controller/deprecated_redirects.rb +0 -17
  279. data/lib/action_controller/deprecated_request_methods.rb +0 -34
  280. data/lib/action_controller/macros/auto_complete.rb +0 -53
  281. data/lib/action_controller/macros/in_place_editing.rb +0 -33
  282. data/lib/action_controller/pagination.rb +0 -408
  283. data/lib/action_controller/scaffolding.rb +0 -189
  284. data/lib/action_controller/templates/rescues/_request_and_response.rhtml +0 -44
  285. data/lib/action_controller/templates/scaffolds/edit.rhtml +0 -7
  286. data/lib/action_controller/templates/scaffolds/layout.rhtml +0 -69
  287. data/lib/action_controller/templates/scaffolds/list.rhtml +0 -27
  288. data/lib/action_controller/templates/scaffolds/new.rhtml +0 -6
  289. data/lib/action_controller/templates/scaffolds/show.rhtml +0 -9
  290. data/lib/action_controller/vendor/xml_node.rb +0 -97
  291. data/lib/action_view/helpers/deprecated_helper.rb +0 -37
  292. data/lib/action_view/helpers/java_script_macros_helper.rb +0 -233
  293. data/lib/action_view/helpers/pagination_helper.rb +0 -86
  294. data/test/activerecord/active_record_assertions_test.rb +0 -92
  295. data/test/activerecord/pagination_test.rb +0 -165
  296. data/test/controller/deprecated_instance_variables_test.rb +0 -48
  297. data/test/controller/raw_post_test.rb +0 -68
  298. data/test/fixtures/deprecated_instance_variables/_cookies_ivar.rhtml +0 -1
  299. data/test/fixtures/deprecated_instance_variables/_cookies_method.rhtml +0 -1
  300. data/test/fixtures/deprecated_instance_variables/_flash_ivar.rhtml +0 -1
  301. data/test/fixtures/deprecated_instance_variables/_flash_method.rhtml +0 -1
  302. data/test/fixtures/deprecated_instance_variables/_headers_ivar.rhtml +0 -1
  303. data/test/fixtures/deprecated_instance_variables/_headers_method.rhtml +0 -1
  304. data/test/fixtures/deprecated_instance_variables/_params_ivar.rhtml +0 -1
  305. data/test/fixtures/deprecated_instance_variables/_params_method.rhtml +0 -1
  306. data/test/fixtures/deprecated_instance_variables/_request_ivar.rhtml +0 -1
  307. data/test/fixtures/deprecated_instance_variables/_request_method.rhtml +0 -1
  308. data/test/fixtures/deprecated_instance_variables/_response_ivar.rhtml +0 -1
  309. data/test/fixtures/deprecated_instance_variables/_response_method.rhtml +0 -1
  310. data/test/fixtures/deprecated_instance_variables/_session_ivar.rhtml +0 -1
  311. data/test/fixtures/deprecated_instance_variables/_session_method.rhtml +0 -1
  312. data/test/fixtures/respond_to/layouts/standard.rhtml +0 -1
  313. data/test/fixtures/test/_hash_object.rhtml +0 -1
  314. data/test/fixtures/test/list.rhtml +0 -1
  315. data/test/template/deprecated_helper_test.rb +0 -36
  316. data/test/template/deprecated_instance_variables_test.rb +0 -43
  317. data/test/template/java_script_macros_helper_test.rb +0 -109
data/CHANGELOG CHANGED
@@ -1,34 +1,389 @@
1
- *1.13.6* (November 24th, 2007)
1
+ *2.0.0* (December 6th, 2007)
2
2
 
3
- * Correct Broken Fix for session_fixation attacks
3
+ * Fixed send_file/binary_content for testing #8044 [tolsen]
4
+
5
+ * When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [danger]
6
+
7
+ * Update Prototype to 1.6.0.1. [sam]
8
+
9
+ * Update script.aculo.us to 1.8.0.1. [madrobby]
10
+
11
+ * Add 'disabled' attribute to <OPTION> separators used in time zone and country selects. Closes #10354 [hasmanyjosh]
12
+
13
+ * Added the same record identification guessing rules to fields_for as form_for has [DHH]
14
+
15
+ * Fixed that verification violations with no specified action didn't halt the chain (now they do with a 400 Bad Request) [DHH]
16
+
17
+ * Raise UnknownHttpMethod exception for unknown HTTP methods. Closes #10303 [tarmo]
18
+
19
+ * Update to Prototype -r8232. [sam]
20
+
21
+ * Make sure the optimisation code for routes doesn't get used if :host, :anchor or :port are provided in the hash arguments. [pager, Koz] #10292
22
+
23
+ * Added protection from trailing slashes on page caching #10229 [devrieda]
24
+
25
+ * Asset timestamps are appended, not prepended. Closes #10276 [mnaberez]
26
+
27
+ * Minor inconsistency in description of render example. Closes #10029 [ScottSchram]
28
+
29
+ * Add #prepend_view_path and #append_view_path instance methods on ActionController::Base for consistency with the class methods. [rick]
30
+
31
+ * Refactor sanitizer helpers into HTML classes and make it easy to swap them out with custom implementations. Closes #10129. [rick]
32
+
33
+ * Add deprecation for old subtemplate syntax for ActionMailer templates, use render :partial [rick]
34
+
35
+ * Fix TemplateError so it doesn't bomb on exceptions while running tests [rick]
36
+
37
+ * Fixed that named routes living under resources shouldn't have double slashes #10198 [isaacfeliu]
38
+
39
+ * Make sure that cookie sessions use a secret that is at least 30 chars in length. [Koz]
40
+
41
+ * Fixed that partial rendering should look at the type of the first render to determine its own type if no other clues are available (like when using text.plain.erb as the extension in AM) #10130 [java]
42
+
43
+ * Fixed that has_many :through associations should render as collections too #9051 [mathie/danger]
44
+
45
+ * Added :mouseover short-cut to AssetTagHelper#image_tag for doing easy image swaps #6893 [joost]
46
+
47
+ * Fixed handling of non-domain hosts #9479 [purp]
48
+
49
+ * Fix syntax error in documentation example for cycle method. Closes #8735 [foca]
50
+
51
+ * Document :with option for link_to_remote. Closes #8765 [ryanb]
52
+
53
+ * Document :minute_step option for time_select. Closes #8814 [brupm]
54
+
55
+ * Explain how to use the :href option for link_to_remote to degrade gracefully in the absence of JavaScript. Closes #8911 [vlad]
56
+
57
+ * Disambiguate :size option for text area tag. Closes #8955 [redbeard]
58
+
59
+ * Fix broken tag in assert_tag documentation. Closes #9037 [mfazekas]
60
+
61
+ * Add documentation for route conditions. Closes #9041 [innu, manfred]
62
+
63
+ * Fix typo left over from previous typo fix in url helper. Closes #9414 [Henrik N]
64
+
65
+ * Fixed that ActionController::CgiRequest#host_with_port() should handle standard port #10082 [moro]
66
+
67
+ * Update Prototype to 1.6.0 and script.aculo.us to 1.8.0. [sam, madrobby]
68
+
69
+ * Expose the cookie jar as a helper method (before the view would just get the raw cookie hash) [DHH]
70
+
71
+ * Integration tests: get_ and post_via_redirect take a headers hash. #9130 [simonjefford]
72
+
73
+ * Simplfy #view_paths implementation. ActionView templates get the exact object, not a dup. [Rick]
74
+
75
+ * Update tests for ActiveSupport's JSON escaping change. [rick]
76
+
77
+ * FormHelper's auto_index should use #to_param instead of #id_before_type_cast. Closes #9994 [mattly]
78
+
79
+ * Doc typo fixes for ActiveRecordHelper. Closes #9973 [mikong]
80
+
81
+ * Make example parameters in restful routing docs idiomatic. Closes #9993 [danger]
82
+
83
+ * Make documentation comment for mime responders match documentation example. Closes #9357 [yon]
84
+
85
+ * Introduce a new test case class for functional tests. ActionController::TestCase. [Koz]
86
+
87
+ * Fix incorrect path in helper rdoc. Closes #9926 [viktor tron]
88
+
89
+ * Partials also set 'object' to the default partial variable. #8823 [Nick Retallack, Jeremy Kemper]
90
+
91
+ * Request profiler. [Jeremy Kemper]
92
+ $ cat login_session.rb
93
+ get_with_redirect '/'
94
+ say "GET / => #{path}"
95
+ post_with_redirect '/sessions', :username => 'john', :password => 'doe'
96
+ say "POST /sessions => #{path}"
97
+ $ ./script/performance/request -n 10 login_session.rb
98
+
99
+ * Disabled checkboxes don't submit a form value. #9301 [vladr, robinjfisher]
100
+
101
+ * Added tests for options to ActiveRecordHelper#form. Closes #7213 [richcollins, mikong, mislav]
102
+
103
+ * Changed before_filter halting to happen automatically on render or redirect but no longer on simply returning false [DHH]
4
104
 
5
105
  * Ensure that cookies handle array values correctly. Closes #9937 [queso]
6
106
 
7
- *1.13.5* (October 12th, 2007)
107
+ * Make sure resource routes don't clash with internal helpers like javascript_path, image_path etc. #9928 [gbuesing]
8
108
 
9
- * Backport: allow array and hash query parameters. Array route parameters are converted/to/a/path as before. #6765, #7047, #7462 [bgipsy, Jeremy McAnally, Dan Kubb, brendan, Diego Algorta Casamayou]
109
+ * caches_page uses a single after_filter instead of one per action. #9891 [lifofifo]
10
110
 
11
- * Fix in place editor's setter action with non-string fields. #7418 [Andreas]
111
+ * Update Prototype to 1.6.0_rc1 and script.aculo.us to 1.8.0 preview 0. [sam, madrobby]
12
112
 
113
+ * Dispatcher: fix that to_prepare should only run once in production. #9889 [Nathaniel Talbott]
13
114
 
14
- *1.13.4* (October 4th, 2007)
115
+ * Memcached sessions: add session data on initialization; don't silently discard exceptions; add unit tests. #9823 [kamk]
15
116
 
16
- * Only accept session ids from cookies, prevents session fixation attacks. [bradediger]
117
+ * error_messages_for also takes :message and :header_message options which defaults to the old "There were problems with the following fields:" and "<count> errors prohibited this <object_name> from being saved". #8270 [rmm5t, zach-inglis-lt3]
17
118
 
18
- * Change the resource seperator from ; to / change the generated routes to use the new-style named routes. e.g. new_group_user_path(@group) instead of group_new_user_path(@group). [pixeltrix]
119
+ * Make sure that custom inflections are picked up by map.resources. #9815 [mislav]
19
120
 
20
- * Integration tests: introduce methods for other HTTP methods. #6353 [caboose]
121
+ * Changed SanitizeHelper#sanitize to only allow the custom attributes and tags when specified in the call [DHH]
122
+
123
+ * Extracted sanitization methods from TextHelper to SanitizeHelper [DHH]
124
+
125
+ * rescue_from accepts :with => lambda { |exception| ... } or a normal block. #9827 [lifofifo]
126
+
127
+ * Add :status to redirect_to allowing users to choose their own response code without manually setting headers. #8297 [codahale, chasgrundy]
128
+
129
+ * Add link_to :back which uses your referrer with a fallback to a javascript link. #7366 [eventualbuddha, tarmo]
130
+
131
+ * error_messages_for and friends also work with local variables. #9699 [Frederick Cheung]
132
+
133
+ * Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. #8562, #9525 [Justin Lynn, Tarmo Tänav, shoe]
134
+
135
+ * Use #require_library_or_gem to load the memcache library for the MemCache session and fragment cache stores. Closes #8662. [Rick]
136
+
137
+ * Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config. [Rick]
138
+
139
+ config.action_controller.optimise_named_routes = false
140
+
141
+ * ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick]
142
+
143
+ * Only accept session ids from cookies, prevents session fixation attacks. [bradediger]
144
+
145
+
146
+ *2.0.0 [Preview Release]* (September 29th, 2007) [Includes duplicates of changes from 1.12.2 - 1.13.3]
147
+
148
+ * Fixed that render template did not honor exempt_from_layout #9698 [pezra]
149
+
150
+ * Better error messages if you leave out the :secret option for request forgery protection. Closes #9670 [rick]
151
+
152
+ * Allow ability to disable request forgery protection, disable it in test mode by default. Closes #9693 [lifofifo]
153
+
154
+ * Avoid calling is_missing on LoadErrors. Closes #7460. [ntalbott]
155
+
156
+ * Move Railties' Dispatcher to ActionController::Dispatcher, introduce before_ and after_dispatch callbacks, and warm up to non-CGI requests. [Jeremy Kemper]
157
+
158
+ * The tag helper may bypass escaping. [Jeremy Kemper]
159
+
160
+ * Cache asset ids. [Jeremy Kemper]
161
+
162
+ * Optimized named routes respect AbstractRequest.relative_url_root. #9612 [danielmorrison, Jeremy Kemper]
163
+
164
+ * Introduce ActionController::Base.rescue_from to declare exception-handling methods. Cleaner style than the case-heavy rescue_action_in_public. #9449 [norbert]
165
+
166
+ * Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick]
167
+
168
+ * Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model that verifies session-specific _tokens for non-GET requests. [Rick]
169
+
170
+ * Secure #sanitize, #strip_tags, and #strip_links helpers against xss attacks. Closes #8877. [Rick, lifofifo, Jacques Distler]
171
+
172
+ This merges and renames the popular white_list helper (along with some css sanitizing from Jacques Distler version of the same plugin).
173
+ Also applied updated versions of #strip_tags and #strip_links from #8877.
174
+
175
+ * Remove use of & logic operator. Closes #8114. [watson]
176
+
177
+ * Fixed JavaScriptHelper#escape_javascript to also escape closing tags #8023 [rubyruy]
178
+
179
+ * Fixed TextHelper#word_wrap for multiline strings with extra carrier returns #8663 [seth]
180
+
181
+ * Fixed that setting the :host option in url_for would automatically turn off :only_path (since :host would otherwise not be shown) #9586 [Bounga]
182
+
183
+ * Added FormHelper#label. #8641, #9850 [jcoglan, jarkko]
184
+
185
+ * Added AtomFeedHelper (slightly improved from the atom_feed_helper plugin) [DHH]
186
+
187
+ * Prevent errors when generating routes for uncountable resources, (i.e. sheep where plural == singluar). map.resources :sheep now creates sheep_index_url for the collection and sheep_url for the specific item. [Koz]
188
+
189
+ * Added support for HTTP Only cookies (works in IE6+ and FF 2.0.5+) as an improvement for XSS attacks #8895 [lifo/Spakman]
190
+
191
+ * Don't warn when a path segment precedes a required segment. Closes #9615. [Nicholas Seckar]
192
+
193
+ * Fixed CaptureHelper#content_for to work with the optional content parameter instead of just the block #9434 [sandofsky/wildchild].
194
+
195
+ * Added Mime::Type.register_alias for dealing with different formats using the same mime type [DHH]. Example:
196
+
197
+ class PostsController < ApplicationController
198
+ before_filter :adjust_format_for_iphone
199
+
200
+ def index
201
+ @posts = Post.find(:all)
202
+
203
+ respond_to do |format|
204
+ format.html # => renders index.html.erb and uses "text/html" as the content type
205
+ format.iphone # => renders index.iphone.erb and uses "text/html" as the content type
206
+ end
207
+ end
208
+
209
+
210
+ private
211
+ def adjust_format_for_iphone
212
+ if request.env["HTTP_USER_AGENT"] && request.env["HTTP_USER_AGENT"][/iPhone/]
213
+ request.format = :iphone
214
+ end
215
+ end
216
+ end
217
+
218
+ * Added that render :json will automatically call .to_json unless it's being passed a string [DHH].
219
+
220
+ * Autolink behaves well with emails embedded in URLs. #7313 [Jeremy McAnally, tarmo]
221
+
222
+ * Fixed that default layouts did not take the format into account #9564 [lifofifo]
223
+
224
+ * Fixed optimized route segment escaping. #9562 [wildchild, Jeremy Kemper]
225
+
226
+ * Added block acceptance to JavaScriptHelper#javascript_tag. #7527 [Bob Silva, Tarmo Tänav, rmm5t]
227
+
228
+ * root_path returns '/' not ''. #9563 [lifofifo]
229
+
230
+ * Fixed that setting request.format should also affect respond_to blocks [DHH]
231
+
232
+ * Add option to force binary mode on tempfile used for fixture_file_upload. #6380 [Jonathan Viney]
233
+
234
+ * Fixed that resource namespaces wouldn't stick to all nested resources #9399 [pixeltrix]
235
+
236
+ * Moved ActionController::Macros::AutoComplete into the auto_complete plugin on the official Rails svn #9512 [lifofifo]
237
+
238
+ * Moved ActionController::Macros::InPlaceEditing into the in_place_editor plugin on the official Rails svn #9513 [lifofifo]
239
+
240
+ * Removed deprecated form of calling xml_http_request/xhr without the first argument being the http verb [DHH]
241
+
242
+ * Removed deprecated methods [DHH]:
243
+
244
+ - ActionController::Base#keep_flash (use flash.keep instead)
245
+ - ActionController::Base#expire_matched_fragments (just call expire_fragment with a regular expression)
246
+ - ActionController::Base.template_root/= methods (use ActionController#Base.view_paths/= instead)
247
+ - ActionController::Base.cookie (use ActionController#Base.cookies[]= instead)
248
+
249
+ * Removed the deprecated behavior of appending ".png" to image_tag/image_path calls without an existing extension [DHH]
250
+
251
+ * Removed ActionController::Base.scaffold -- it went through the whole idea of scaffolding (card board walls you remove and tweak one by one). Use the scaffold generator instead (it does resources too now!) [DHH]
252
+
253
+ * Optimise named route generation when using positional arguments. [Koz]
254
+
255
+ This change delivers significant performance benefits for the most
256
+ common usage scenarios for modern rails applications by avoiding the
257
+ costly trip through url_for. Initial benchmarks indicate this is
258
+ between 6 and 20 times as fast.
259
+
260
+ * Explicitly require active_record/query_cache before using it. [Jeremy Kemper]
261
+
262
+ * Fix layout overriding response status. #9476 [lotswholetime]
263
+
264
+ * Add field_set_tag for generating field_sets, closes #9477. [djanowski]
265
+
266
+ * Allow additional parameters to be passed to named route helpers when using positional arguments. Closes #8930 [ian.w.white@gmail.com]
267
+
268
+ * Make render :partial work with a :collection of Hashes, previously this wasn't possible due to backwards compatibility restrictions. [lifofifo]
269
+
270
+ * request.host works with IPv6 addresses. #9458 [yuya]
271
+
272
+ * Fix bug where action caching sets the content type to the ActionCachePath object. Closes #9282 [mindforge]
273
+
274
+ * Find layouts even if they're not in the first view_paths directory. Closes #9258 [caio]
275
+
276
+ * Major improvement to the documentation for the options / select form helpers. Closes #9038 [kampers, jardeon, wesg]
277
+
278
+ * Fix number_to_human_size when using different precisions. Closes #7536. [RichardStrand, mpalmer]
279
+
280
+ * Added partial layouts (see example in action_view/lib/partials.rb) [DHH]
281
+
282
+ * Allow you to set custom :conditions on resource routes. [Rick]
283
+
284
+ * Fixed that file.content_type for uploaded files would include a trailing \r #9053 [bgreenlee]
21
285
 
22
- * Improve performance of action caching. Closes #8231 [skaes]
286
+ * url_for now accepts a series of symbols representing the namespace of the record [Josh Knowles]
287
+
288
+ * Make :trailing_slash work with query parameters for url_for. Closes #4004 [nov]
289
+
290
+ * Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003]
23
291
 
24
292
  * Fix errors with around_filters which do not yield, restore 1.1 behaviour with after filters. Closes #8891 [skaes]
25
293
 
26
294
  After filters will *no longer* be run if an around_filter fails to yield, users relying on
27
295
  this behaviour are advised to put the code in question after a yield statement in an around filter.
296
+
28
297
 
29
298
  * Allow you to delete cookies with options. Closes #3685 [josh, Chris Wanstrath]
30
299
 
31
- * Deprecate pagination. Install the classic_pagination plugin for forward compatibility, or move to the superior will_paginate plugin. #8157 [Mislav Marohnic]
300
+ * Allow you to render views with periods in the name. Closes #8076 [norbert]
301
+
302
+ render :partial => 'show.html.erb'
303
+
304
+ * Improve capture helper documentation. #8796 [kampers]
305
+
306
+ * Prefix nested resource named routes with their action name, e.g. new_group_user_path(@group) instead of group_new_user_path(@group). The old nested action named route is deprecated in Rails 1.2.4. #8558 [David Chelimsky]
307
+
308
+ * Allow sweepers to be created solely for expiring after controller actions, not model changes [DHH]
309
+
310
+ * Added assigns method to ActionController::Caching::Sweeper to easily access instance variables on the controller [DHH]
311
+
312
+ * Give the legacy X-POST_DATA_FORMAT header greater precedence during params parsing for backward compatibility. [Jeremy Kemper]
313
+
314
+ * Fixed that link_to with an href of # when using :method will not allow for click-through without JavaScript #7037 [stevenbristol/josh]
315
+
316
+ * Fixed that radio_button_tag should generate unique ids #3353 [BobSilva/rebecca/josh]
317
+
318
+ * Fixed that HTTP authentication should work if the header is called REDIRECT_X_HTTP_AUTHORIZATION as well #6754 [mislaw]
319
+
320
+ * Don't mistakenly interpret the request uri as the query string. #8731 [lifofifo, Jeremy Kemper]
321
+
322
+ * Make ActionView#view_paths an attr_accessor for real this time. Also, don't perform an unnecessary #compact on the @view_paths array in #initialize. Closes #8582 [dasil003, julik, rick]
323
+
324
+ * Tolerate missing content type on multipart file uploads. Fix for Safari 3. [Jeremy Kemper]
325
+
326
+ * Deprecation: remove pagination. Install the classic_pagination plugin for forward compatibility, or move to the superior will_paginate plugin. #8157 [Josh Peek]
327
+
328
+ * Action caching is limited to GET requests returning 200 OK status. #3335 [tom@craz8.com, halfbyte, Dan Kubb, Josh Peek]
329
+
330
+ * Improve Text Helper test coverage. #7274 [Rob Sanheim, Josh Peek]
331
+
332
+ * Improve helper test coverage. #7208, #7212, #7215, #7233, #7234, #7235, #7236, #7237, #7238, #7241, #7243, #7244 [Rich Collins, Josh Peek]
333
+
334
+ * Improve UrlRewriter tests. #7207 [Rich Collins]
335
+
336
+ * Resources: url_for([parent, child]) generates /parents/1/children/2 for the nested resource. Likewise with the other simply helpful methods like form_for and link_to. #6432 [mhw, Jonathan Vaught, lotswholetime]
337
+
338
+ * Assume html format when rendering partials in RJS. #8076 [Rick]
339
+
340
+ * Don't double-escape url_for in views. #8144 [Rich Collins, Josh Peek]
341
+
342
+ * Allow JSON-style values for the :with option of observe_field. Closes #8557 [kommen]
343
+
344
+ * Remove RAILS_ROOT from backtrace paths. #8540 [Tim Pope]
345
+
346
+ * Routing: map.resource :logo routes to LogosController so the controller may be reused for multiple nestings or namespaces. [Jeremy Kemper]
347
+
348
+ * render :partial recognizes Active Record associations as Arrays. #8538 [kamal]
349
+
350
+ * Routing: drop semicolon and comma as route separators. [Jeremy Kemper]
351
+
352
+ * request.remote_ip understands X-Forwarded-For addresses with nonstandard whitespace. #7386 [moses]
353
+
354
+ * Don't prepare response when rendering a component. #8493 [jsierles]
355
+
356
+ * Reduce file stat calls when checking for template changes. #7736 [alex]
357
+
358
+ * Added custom path cache_page/expire_page parameters in addition to the options hashes [DHH]. Example:
359
+
360
+ def index
361
+ caches_page(response.body, "/index.html")
362
+ end
363
+
364
+ * Action Caching speedup. #8231 [skaes]
365
+
366
+ * Wordsmith resources documentation. #8484 [marclove]
367
+
368
+ * Fix syntax error in code example for routing documentation. #8377. [norbert]
369
+
370
+ * Routing: respond with 405 Method Not Allowed status when the route path matches but the HTTP method does not. #6953 [Josh Peek, defeated, Dan Kubb, Coda Hale]
371
+
372
+ * Add support for assert_select_rjs with :show and :hide. #7780 [dchelimsky]
373
+
374
+ * Make assert_select's failure messages clearer about what failed. #7779 [dchelimsky]
375
+
376
+ * Introduce a default respond_to block for custom types. #8174 [Josh Peek]
377
+
378
+ * auto_complete_field takes a :method option so you can GET or POST. #8120 [zapnap]
379
+
380
+ * Added option to suppress :size when using :maxlength for FormTagHelper#text_field #3112 [rails@tpope.info]
381
+
382
+ * catch possible WSOD when trying to render a missing partial. Closes #8454 [Catfish]
383
+
384
+ * Rewind request body after reading it, if possible. #8438 [s450r1]
385
+
386
+ * Resource namespaces are inherited by their has_many subresources. #8280 [marclove, ggarside]
32
387
 
33
388
  * Fix filtered parameter logging with nil parameter values. #8422 [choonkeat]
34
389
 
@@ -36,26 +391,1051 @@
36
391
 
37
392
  * Document caches_action. #5419 [Jarkko Laine]
38
393
 
394
+ * Update to Prototype 1.5.1. [Sam Stephenson]
395
+
396
+ * Allow routes to be decalred under namespaces [Tobias Luetke]:
397
+
398
+ map.namespace :admin do |admin|
399
+ admin.root :controller => "products"
400
+ admin.feed 'feed.xml', :controller => 'products', :action => 'feed', :format => 'xml'
401
+ end
402
+
403
+ * Update to script.aculo.us 1.7.1_beta3. [Thomas Fuchs]
404
+
39
405
  * observe_form always sends the serialized form. #5271 [manfred, normelton@gmail.com]
40
406
 
407
+ * Parse url-encoded and multipart requests ourselves instead of delegating to CGI. [Jeremy Kemper]
408
+
409
+ * select :include_blank option can be set to a string instead of true, which just uses an empty string. #7664 [Wizard]
410
+
411
+ * Added url_for usage on render :location, which allows for record identification [DHH]. Example:
412
+
413
+ render :xml => person, :status => :created, :location => person
414
+
415
+ ...expands the location to person_url(person).
416
+
417
+ * Introduce the request.body stream. Lazy-read to parse parameters rather than always setting RAW_POST_DATA. Reduces the memory footprint of large binary PUT requests. [Jeremy Kemper]
418
+
419
+ * Add some performance enhancements to ActionView.
420
+
421
+ * Cache base_paths in @@cached_base_paths
422
+ * Cache template extensions in @@cached_template_extension
423
+ * Remove unnecessary rescues
424
+
425
+ * Assume that rendered partials go by the HTML format by default
426
+
427
+ def my_partial
428
+ render :update do |page|
429
+ # in this order
430
+ # _foo.html.erb
431
+ # _foo.erb
432
+ # _foo.rhtml
433
+ page.replace :foo, :partial => 'foo'
434
+ end
435
+ end
436
+
437
+ * Added record identifications to FormHelper#form_for and PrototypeHelper#remote_form_for [DHH]. Examples:
438
+
439
+ <% form_for(@post) do |f| %>
440
+ ...
441
+ <% end %>
442
+
443
+ This will expand to be the same as:
444
+
445
+ <% form_for :post, @post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %>
446
+ ...
447
+ <% end %>
448
+
449
+ And for new records:
450
+
451
+ <% form_for(Post.new) do |f| %>
452
+ ...
453
+ <% end %>
454
+
455
+ This will expand to be the same as:
456
+
457
+ <% form_for :post, @post, :url => posts_path, :html => { :class => "new_post", :id => "new_post" } do |f| %>
458
+ ...
459
+ <% end %>
460
+
461
+ * Rationalize route path escaping according to RFC 2396 section 3.3. #7544, #8307. [Jeremy Kemper, chrisroos, begemot, jugend]
462
+
463
+ * Added record identification with polymorphic routes for ActionController::Base#url_for and ActionView::Base#url_for [DHH]. Examples:
464
+
465
+ redirect_to(post) # => redirect_to(posts_url(post)) => Location: http://example.com/posts/1
466
+ link_to(post.title, post) # => link_to(post.title, posts_url(post)) => <a href="/posts/1">Hello world</a>
467
+
468
+ Any method that calls url_for on its parameters will automatically benefit from this.
469
+
470
+ * Removed deprecated parameters_for_method_reference concept (legacy from before named routes) [DHH]
471
+
472
+ * Add ActionController::Routing::Helpers, a module to contain common URL helpers such as polymorphic_url. [Nicholas Seckar]
473
+
474
+ * Included the HttpAuthentication plugin as part of core (ActionController::HttpAuthentication::Basic) [DHH]
475
+
476
+ * Modernize documentation for form helpers. [jeremymcanally]
477
+
478
+ * Add brief introduction to REST to the resources documentation. [fearoffish]
479
+
480
+ * Fix various documentation typos throughout ActionPack. [Henrik N]
481
+
482
+ * Enhance documentation and add examples for url_for. [jeremymcanally]
483
+
484
+ * Fix documentation typo in routes. [norbert, pam]
485
+
486
+ * Sweep flash when filter chain is halted. [Caio Chassot <lists@v2studio.com>]
487
+
488
+ * Fixed that content_tag with a block will just return the result instead of concate it if not used in a ERb view #7857, #7432 [michael.niessner]
489
+
490
+ * Replace the current block/continuation filter chain handling by an implementation based on a simple loop. #8226 [Stefan Kaes]
491
+
41
492
  * Update UrlWriter to accept :anchor parameter. Closes #6771. [octopod]
42
493
 
43
- * Replace the current block/continuation filter chain handling by an implementation based on a simple loop. Closes #8226 [Stefan Kaes]
494
+ * Added RecordTagHelper for using RecordIdentifier conventions on divs and other container elements [DHH]. Example:
44
495
 
45
- * Return the string representation from an Xml Builder when rendering a partial. #5044 [tpope]
496
+ <% div_for(post) do %> <div id="post_45" class="post">
497
+ <%= post.body %> What a wonderful world!
498
+ <% end %> </div>
46
499
 
47
- * Cleaned up, corrected, and mildly expanded ActionPack documentation. Closes #7190 [jeremymcanally]
500
+ * Added page[record] accessor to JavaScriptGenerator that relies on RecordIdentifier to find the right dom id [DHH]. Example:
48
501
 
49
- * Small collection of ActionController documentation cleanups. Closes #7319 [jeremymcanally]
502
+ format.js do
503
+ # Calls: new Effect.fade('post_45');
504
+ render(:update) { |page| page[post].visual_effect(:fade) }
505
+ end
50
506
 
51
- * Performance: patch cgi/session/pstore to require digest/md5 once rather than per #initialize. #7583 [Stefan Kaes]
507
+ * Added RecordIdentifier to enforce view conventions on records for dom ids, classes, and partial paths [DHH]
52
508
 
53
- * Deprecation: verification with :redirect_to => :named_route shouldn't be deprecated. #7525 [Justin French]
509
+ * Added map.namespace to deal with the common situation of admin sections and the like [DHH]
510
+
511
+ Before:
512
+
513
+ map.resources :products, :path_prefix => "admin", :controller => "admin/products", :collection => { :inventory => :get }, :member => { :duplicate => :post }
514
+ map.resources :tags, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_tags"
515
+ map.resources :images, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_images"
516
+ map.resources :variants, :name_prefix => 'admin_product_', :path_prefix => "admin/products/:product_id", :controller => "admin/product_variants"
517
+
518
+ After:
519
+
520
+ map.namespace(:admin) do |admin|
521
+ admin.resources :products,
522
+ :collection => { :inventory => :get },
523
+ :member => { :duplicate => :post },
524
+ :has_many => [ :tags, :images, :variants ]
525
+ end
526
+
527
+ * Added :name_prefix as standard for nested resources [DHH]. WARNING: May be backwards incompatible with your app
528
+
529
+ Before:
530
+
531
+ map.resources :emails do |emails|
532
+ emails.resources :comments, :name_prefix => "email_"
533
+ emails.resources :attachments, :name_prefix => "email_"
534
+ end
535
+
536
+ After:
537
+
538
+ map.resources :emails do |emails|
539
+ emails.resources :comments
540
+ emails.resources :attachments
541
+ end
542
+
543
+ This does mean that if you intended to have comments_url go to /emails/5/comments, then you'll have to set :name_prefix to nil explicitly.
544
+
545
+ * Added :has_many and :has_one for declaring plural and singular resources beneath the current [DHH]
546
+
547
+ Before:
548
+
549
+ map.resources :notes do |notes|
550
+ notes.resources :comments
551
+ notes.resources :attachments
552
+ notes.resource :author
553
+ end
554
+
555
+ After:
556
+
557
+ map.resources :notes, :has_many => [ :comments, :attachments ], :has_one => :author
558
+
559
+ * Added that render :xml will try to call to_xml if it can [DHH]. Makes these work:
560
+
561
+ render :xml => post
562
+ render :xml => comments
563
+
564
+ * Added :location option to render so that the common pattern of rendering a response after creating a new resource is now a 1-liner [DHH]
565
+
566
+ render :xml => post.to_xml, :status => :created, :location => post_url(post)
567
+
568
+ * Ensure that render_text only adds string content to the body of the response [DHH]
569
+
570
+ * Return the string representation from an Xml Builder when rendering a partial. Closes #5044 [tpope]
571
+
572
+ * Fixed that parameters from XML should also be presented in a hash with indifferent access [DHH]
573
+
574
+ * Tweak template format rules so that the ACCEPT header is only used if it's text/javascript. This is so ajax actions without a :format param get recognized as Mime::JS. [Rick]
575
+
576
+ * The default respond_to blocks don't set a specific extension anymore, so that both 'show.rjs' and 'show.js.rjs' will work. [Rick]
577
+
578
+ * Allow layouts with extension of .html.erb. Closes #8032 [Josh Knowles]
579
+
580
+ * Change default respond_to templates for xml and rjs formats. [Rick]
581
+
582
+ * Default xml template goes from #{action_name}.rxml => #{action_name}.xml.builder.
583
+ * Default rjs template goes from #{action_name}.rjs => #{action_name}.js.rjs.
584
+
585
+ You can still specify your old templates:
586
+
587
+ respond_to do |format|
588
+ format.xml do
589
+ render :action => "#{action_name}.rxml"
590
+ end
591
+ end
592
+
593
+ * Fix WSOD due to modification of a formatted template extension so that requests to templates like 'foo.html.erb' fail on the second hit. [Rick]
594
+
595
+ * Fix WSOD when template compilation fails [Rick]
596
+
597
+ * Change ActionView template defaults. Look for templates using the request format first, such as "show.html.erb" or "show.xml.builder", before looking for the old defaults like "show.erb" or "show.builder" [Rick]
598
+
599
+ * Highlight helper highlights one or many terms in a single pass. [Jeremy Kemper]
600
+
601
+ * Dropped the use of ; as a separator of non-crud actions on resources and went back to the vanilla slash. It was a neat idea, but lots of the non-crud actions turned out not to be RPC (as the ; was primarily intended to discourage), but legitimate sub-resources, like /parties/recent, which didn't deserve the uglification of /parties;recent. Further more, the semicolon caused issues with caching and HTTP authentication in Safari. Just Not Worth It [DHH]
602
+
603
+ * Added that FormTagHelper#submit_tag will return to its original state if the submit fails and you're using :disable_with [DHH]
604
+
605
+ * Cleaned up, corrected, and mildly expanded ActionPack documentation. Closes #7190 [jeremymcanally]
606
+
607
+ * Small collection of ActionController documentation cleanups. Closes #7319 [jeremymcanally]
608
+
609
+ * Make sure the route expiry hash is constructed by comparing the to_param-ized values of each hash. [Jamis Buck]
610
+
611
+ * Allow configuration of the default action cache path for #caches_action calls. [Rick Olson]
612
+
613
+ class ListsController < ApplicationController
614
+ caches_action :index, :cache_path => Proc.new { |controller|
615
+ controller.params[:user_id] ?
616
+ controller.send(:user_lists_url, c.params[:user_id]) :
617
+ controller.send(:lists_url) }
618
+ end
619
+
620
+ * Performance: patch cgi/session/pstore to require digest/md5 once rather than per #initialize. #7583 [Stefan Kaes]
621
+
622
+ * Cookie session store: ensure that new sessions doesn't reuse data from a deleted session in the same request. [Jeremy Kemper]
623
+
624
+ * Deprecation: verification with :redirect_to => :named_route shouldn't be deprecated. #7525 [Justin French]
625
+
626
+ * Cookie session store: raise ArgumentError when :session_key is blank. [Jeremy Kemper]
627
+
628
+ * Deprecation: remove deprecated request, redirect, and dependency methods. Remove deprecated instance variables. Remove deprecated url_for(:symbol, *args) and redirect_to(:symbol, *args) in favor of named routes. Remove uses_component_template_root for toplevel components directory. Privatize deprecated render_partial and render_partial_collection view methods. Remove deprecated link_to_image, link_image_to, update_element_function, start_form_tag, and end_form_tag helper methods. Remove deprecated human_size helper alias. [Jeremy Kemper]
629
+
630
+ * Consistent public/protected/private visibility for chained methods. #7813 [Dan Manges]
631
+
632
+ * Prefer MIME constants to strings. #7707 [Dan Kubb]
633
+
634
+ * Allow array and hash query parameters. Array route parameters are converted/to/a/path as before. #6765, #7047, #7462 [bgipsy, Jeremy McAnally, Dan Kubb, brendan]
635
+
636
+ # Add a #dbman attr_reader for CGI::Session and make CGI::Session::CookieStore#generate_digest public so it's easy to generate digests
637
+ using the cookie store's secret. [Rick]
638
+
639
+ * Added Request#url that returns the complete URL used for the request [DHH]
640
+
641
+ * Extract dynamic scaffolding into a plugin. #7700 [Josh Peek]
642
+
643
+ * Added user/password options for url_for to add http authentication in a URL [DHH]
644
+
645
+ * Fixed that FormTagHelper#text_area_tag should disregard :size option if it's not a string [Brendon Davidson]
646
+
647
+ * Set the original button value in an attribute of the button when using the :disable_with key with submit_tag, so that the original can be restored later. [Jamis Buck]
648
+
649
+ * session_enabled? works with session :off. #6680 [Catfish]
650
+
651
+ * Added :port and :host handling to UrlRewriter (which unified url_for usage, regardless of whether it's called in view or controller) #7616 [alancfrancis]
652
+
653
+ * Allow send_file/send_data to use a registered mime type as the :type parameter #7620 [jonathan]
654
+
655
+ * Allow routing requirements on map.resource(s) #7633 [quixoten]. Example:
656
+
657
+ map.resources :network_interfaces, :requirements => { :id => /^\d+\.\d+\.\d+\.\d+$/ }
658
+
659
+ * Cookie session store: empty and unchanged sessions don't write a cookie. [Jeremy Kemper]
660
+
661
+ * Added helper(:all) as a way to include all helpers from app/helpers/**/*.rb in ApplicationController [DHH]
662
+
663
+ * Integration tests: introduce methods for other HTTP methods. #6353 [caboose]
664
+
665
+ * Routing: better support for escaped values in route segments. #7544 [Chris
666
+ Roos]
667
+
668
+ * Introduce a cookie-based session store as the Rails default. Sessions typically contain at most a user_id and flash message; both fit within the 4K cookie size limit. A secure message digest is included with the cookie to ensure data integrity (a user cannot alter his user_id without knowing the secret key included in the digest). If you have more than 4K of session data or don't want your data to be visible to the user, pick another session store. Cookie-based sessions are dramatically faster than the alternatives. [Jeremy Kemper]
669
+
670
+ Example config/environment.rb:
671
+ # Use an application-wide secret key and the default SHA1 message digest.
672
+ config.action_controller.session = { :secret => "can't touch this" }
673
+
674
+ # Store a secret key per user and employ a stronger message digest.
675
+ config.action_controller.session = {
676
+ :digest => 'SHA512',
677
+ :secret => Proc.new { User.current.secret_key }
678
+ }
679
+
680
+ * Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though.
681
+
682
+ * Added caching option to AssetTagHelper#stylesheet_link_tag and AssetTagHelper#javascript_include_tag [DHH]. Examples:
683
+
684
+ stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is false =>
685
+ <link href="/stylesheets/style1.css" media="screen" rel="Stylesheet" type="text/css" />
686
+ <link href="/stylesheets/styleB.css" media="screen" rel="Stylesheet" type="text/css" />
687
+ <link href="/stylesheets/styleX2.css" media="screen" rel="Stylesheet" type="text/css" />
688
+
689
+ stylesheet_link_tag :all, :cache => true # when ActionController::Base.perform_caching is true =>
690
+ <link href="/stylesheets/all.css" media="screen" rel="Stylesheet" type="text/css" />
691
+
692
+ ...when caching is on, all.css is the concatenation of style1.css, styleB.css, and styleX2.css.
693
+ Same deal for JavaScripts.
694
+
695
+ * Work around the two connection per host browser limit: use asset%d.myapp.com to distribute asset requests among asset[0123].myapp.com. Use a DNS wildcard or CNAMEs to map these hosts to your asset server. See http://www.die.net/musings/page_load_time/ for background. [Jeremy Kemper]
696
+
697
+ * Added default mime type for CSS (Mime::CSS) [DHH]
698
+
699
+ * Added that rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified and the response body will be set to an empty string. [DHH]
700
+
701
+ * Added X-Runtime to all responses with the request run time [DHH]
702
+
703
+ * Add Mime::Type convenience methods to check the current mime type. [Rick]
704
+
705
+ request.format.html? # => true if Mime::HTML
706
+ request.format.jpg? # => true if Mime::JPG
707
+
708
+ # ActionController sample usage:
709
+ # the session will be disabled for non html/ajax requests
710
+ session :off, :if => Proc.new { |req| !(req.format.html? || req.format.js?) }
711
+
712
+ * Performance: patch cgi/session to require digest/md5 once rather than per #create_new_id. [Stefan Kaes]
713
+
714
+ * Add a :url_based_filename => true option to ActionController::Streaming::send_file, which allows URL-based filenames. [Thomas Fuchs]
715
+
716
+ * Fix that FormTagHelper#submit_tag using :disable_with should trigger the onsubmit handler of its form if available [DHH]
717
+
718
+ * Fix #render_file so that TemplateError is called with the correct params and you don't get the WSOD. [Rick]
719
+
720
+ * Fix issue with deprecation messing up #template_root= usage. Add #prepend_view_path and #append_view_path to allow modification of a copy of the
721
+ superclass' view_paths. [Rick]
722
+
723
+ * Allow Controllers to have multiple view_paths instead of a single template_root. Closes #2754 [John Long]
724
+
725
+ * Add much-needed html-scanner tests. Fixed CDATA parsing bug. [Rick]
726
+
727
+ * improve error message for Routing for named routes. Closes #7346 [Rob Sanheim]
728
+
729
+ * Added enhanced docs to routing assertions. Closes #7359 [Rob Sanheim]
730
+
731
+ * fix form_for example in ActionController::Resources documentation. Closes #7362 [gnarg]
732
+
733
+ * Make sure that the string returned by TextHelper#truncate is actually a string, not a char proxy -- that should only be used internally while working on a multibyte-safe way of truncating [DHH]
734
+
735
+ * Added FormBuilder#submit as a delegate for FormTagHelper#submit_tag [DHH]
736
+
737
+ * Allow Routes to generate all urls for a set of options by specifying :generate_all => true. Allows caching to properly set or expire all paths for a resource. References #1739. [Nicholas Seckar]
738
+
739
+ * Change the query parser to map empty GET params to "" rather than nil. Closes #5694. [Nicholas Seckar]
740
+
741
+ * date_select and datetime_select take a :default option. #7052 [nik.wakelin]
742
+ date_select "post", "written_on", :default => 3.days.from_now
743
+ date_select "credit_card", "bill_due", :default => { :day => 20 }
744
+
745
+ * select :multiple => true suffixes the attribute name with [] unless already suffixed. #6977 [nik.kakelin, ben, julik]
746
+
747
+ * Improve routes documentation. #7095 [zackchandler]
748
+
749
+ * mail_to :encode => 'hex' also encodes the mailto: part of the href attribute as well as the linked email when no name is given. #2061 [Jarkko Laine, pfc.pille@gmx.net]
750
+
751
+ * Resource member routes require :id, eliminating the ambiguous overlap with collection routes. #7229 [dkubb]
752
+
753
+ * Remove deprecated assertions. [Jeremy Kemper]
754
+
755
+ * Change session restoration to allow namespaced models to be autoloaded. Closes #6348. [Nicholas Seckar]
756
+
757
+ * Fix doubly appearing parameters due to string and symbol mixups. Closes #2551. [aeden]
758
+
759
+ * Fix overly greedy rescues when loading helpers. Fixes #6268. [Nicholas Seckar]
760
+
761
+ * Fixed NumberHelper#number_with_delimiter to use "." always for splitting the original number, not the delimiter parameter #7389 [ceefour]
762
+
763
+ * Autolinking recognizes trailing and embedded . , : ; #7354 [Jarkko Laine]
764
+
765
+ * Make TextHelper::auto_link recognize URLs with colons in path correctly, fixes #7268. [imajes]
766
+
767
+ * Update to script.aculo.us 1.7.0. [Thomas Fuchs]
768
+
769
+ * Modernize cookie testing code, and increase coverage (Heckle++) #7101 [Kevin Clark]
770
+
771
+ * Improve Test Coverage for ActionController::Routing::Route#matches_controller_and_action? (Heckle++) #7115 [Kevin Clark]
772
+
773
+ * Heckling ActionController::Resources::Resource revealed that set_prefixes didn't break when :name_prefix was munged. #7081 [Kevin Clark]
774
+
775
+ * Fix #distance_of_time_in_words to report accurately against the Duration class. #7114 [eventualbuddha]
776
+
777
+ * Refactor #form_tag to allow easy extending. [Rick]
778
+
779
+ * Update to Prototype 1.5.0. [Sam Stephenson]
780
+
781
+ * RecordInvalid, RecordNotSaved => 422 Unprocessable Entity, StaleObjectError => 409 Conflict. #7097 [dkubb]
782
+
783
+ * Allow fields_for to be nested inside form_for, so that the name and id get properly constructed [Jamis Buck]
784
+
785
+ * Allow inGroupsOf and eachSlice to be called through rjs. #7046 [Cody Fauser]
786
+
787
+ * Allow exempt_from_layout :rhtml. #6742, #7026 [Dan Manges, Squeegy]
788
+
789
+ * Recognize the .txt extension as Mime::TEXT [Rick]
790
+
791
+ * Fix parsing of array[] CGI parameters so extra empty values aren't included. #6252 [Nicholas Seckar, aiwilliams, brentrowland]
792
+
793
+ * link_to_unless_current works with full URLs as well as paths. #6891 [Jarkko Laine, manfred, idrifter]
794
+
795
+ * Lookup the mime type for #auto_discovery_link_tag in the Mime::Type class. Closes #6941 [Josh Peek]
796
+
797
+ * Fix bug where nested resources ignore a parent singleton parent's path prefix. Closes #6940 [Dan Kubb]
798
+
799
+ * Fix no method error with error_messages_on. Closes #6935 [nik.wakelin Koz]
800
+
801
+ * Slight doc tweak to the ActionView::Helpers::PrototypeHelper#replace docs. Closes #6922 [Steven Bristol]
802
+
803
+ * Slight doc tweak to #prepend_filter. Closes #6493 [Jeremy Voorhis]
804
+
805
+ * Add more extensive documentation to the AssetTagHelper. Closes #6452 [Bob Silva]
806
+
807
+ * Clean up multiple calls to #stringify_keys in TagHelper, add better documentation and testing for TagHelper. Closes #6394 [Bob Silva]
808
+
809
+ * [DOCS] fix reference to ActionController::Macros::AutoComplete for #text_field_with_auto_complete. Closes #2578 [Jan Prill]
810
+
811
+ * Make sure html_document is reset between integration test requests. [ctm]
812
+
813
+ * Set session to an empty hash if :new_session => false and no session cookie or param is present. CGI::Session was raising an unrescued ArgumentError. [Josh Susser]
814
+
815
+ * Routing uses URI escaping for path components and CGI escaping for query parameters. [darix, Jeremy Kemper]
816
+
817
+ * Fix assert_redirected_to bug where redirecting from a nested to to a top-level controller incorrectly added the current controller's nesting. Closes #6128. [Rick Olson]
818
+
819
+ * Singleton resources: POST /singleton => create, GET /singleton/new => new. [Jeremy Kemper]
820
+
821
+ * Use 400 Bad Request status for unrescued ActiveRecord::RecordInvalid exceptions. [Jeremy Kemper]
822
+
823
+ * Silence log_error deprecation warnings from inspecting deprecated instance variables. [Nate Wiger]
824
+
825
+ * Only cache GET requests with a 200 OK response. #6514, #6743 [RSL, anamba]
826
+
827
+ * Add a 'referer' attribute to TestRequest. [Jamis Buck]
828
+
829
+ * Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek]
830
+
831
+ * Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy]
832
+
833
+ * Correctly report which filter halted the chain. #6699 [Martin Emde]
834
+
835
+ * Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752. [Nicholas Seckar]
836
+
837
+ * Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500. [Jeremy Kemper]
838
+
839
+ * Improved auto_link to match more valid urls correctly [Tobias Luetke]
840
+
841
+ * Add singleton resources. [Rick Olson]
842
+
843
+ map.resource :account
844
+
845
+ GET /account
846
+ GET /account;edit
847
+ UPDATE /account
848
+ DELETE /account
849
+
850
+ * respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. #4185 [Scott Raymond, eventualbuddha]
851
+ # application/json response with body 'Element.show({:name: "David"})'
852
+ respond_to do |format|
853
+ format.json { render :json => { :name => "David" }.to_json, :callback => 'Element.show' }
854
+ end
855
+
856
+ * Makes :discard_year work without breaking multi-attribute parsing in AR. #1260, #3800 [sean@ardismg.com, jmartin@desertflood.com, stephen@touset.org, Bob Silva]
857
+
858
+ * Adds html id attribute to date helper elements. #1050, #1382 [mortonda@dgrmm.net, David North, Bob Silva]
859
+
860
+ * Add :index and @auto_index capability to model driven date/time selects. #847, #2655 [moriq, Doug Fales, Bob Silva]
861
+
862
+ * Add :order to datetime_select, select_datetime, and select_date. #1427 [Timothee Peignier, patrick@lenz.sh, Bob Silva]
863
+
864
+ * Added time_select to work with time values in models. Update scaffolding. #2489, #2833 [Justin Palmer, Andre Caum, Bob Silva]
865
+
866
+ * Added :include_seconds to select_datetime, datetime_select and time_select. #2998 [csn, Bob Silva]
867
+
868
+ * All date/datetime selects can now accept an array of month names with :use_month_names. Allows for localization. #363 [tomasj, Bob Silva]
869
+
870
+ * Adds :time_separator to select_time and :date_separator to select_datetime. Preserves BC. #3811 [Bob Silva]
871
+
872
+ * Added map.root as an alias for map.connect '' [DHH]
873
+
874
+ * Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH]. Examples:
875
+
876
+ GET /posts/5.xml | request.format => Mime::XML
877
+ GET /posts/5.xhtml | request.format => Mime::HTML
878
+ GET /posts/5 | request.format => request.accepts.first (usually Mime::HTML for browsers)
879
+
880
+ * Added the option for extension aliases to mime type registration [DHH]. Example (already in the default routes):
881
+
882
+ Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
883
+
884
+ ...will respond on both .html and .xhtml.
885
+
886
+ * @response.redirect_url works with 201 Created responses: just return headers['Location'] rather than checking the response status. [Jeremy Kemper]
887
+
888
+ * Added CSV to Mime::SET so that respond_to csv will work [Cody Fauser]
889
+
890
+ * Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH]
891
+
892
+ * Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH]
893
+
894
+ * Update Routing to complain when :controller is not specified by a route. Closes #6669. [Nicholas Seckar]
895
+
896
+ * Ensure render_to_string cleans up after itself when an exception is raised. #6658 [Rob Sanheim]
897
+
898
+ * Extract template_changed_since? from compile_template? so plugins may override its behavior for non-file-based templates. #6651 [Jeff Barczewski]
899
+
900
+ * Update to Prototype and script.aculo.us [5579]. [Thomas Fuchs]
901
+
902
+ * simple_format helper doesn't choke on nil. #6644 [jerry426]
903
+
904
+ * Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs]
905
+
906
+ * Reuse named route helper module between Routing reloads. Use remove_method to delete named route methods after each load. Since the module is never collected, this fixes a significant memory leak. [Nicholas Seckar]
907
+
908
+ * ActionView::Base.erb_variable accessor names the buffer variable used to render templates. Defaults to _erbout; use _buf for erubis. [Rick Olson]
909
+
910
+ * assert_select_rjs :remove. [Dylan Egan]
911
+
912
+ * Always clear model associations from session. #4795 [sd@notso.net, andylien@gmail.com]
913
+
914
+ * Update to Prototype 1.5.0_rc2. [Sam Stephenson]
915
+
916
+ * Remove JavaScriptLiteral in favor of ActiveSupport::JSON::Variable. [Sam Stephenson]
917
+
918
+ * Sync ActionController::StatusCodes::STATUS_CODES with http://www.iana.org/assignments/http-status-codes. #6586 [dkubb]
919
+
920
+ * Multipart form values may have a content type without being treated as uploaded files if they do not provide a filename. #6401 [Andreas Schwarz, Jeremy Kemper]
921
+
922
+ * assert_response supports symbolic status codes. #6569 [Kevin Clark]
923
+ assert_response :ok
924
+ assert_response :not_found
925
+ assert_response :forbidden
926
+
927
+ * Cache parsed query parameters. #6559 [Stefan Kaes]
928
+
929
+ * Deprecate JavaScriptHelper#update_element_function, which is superseeded by RJS [Thomas Fuchs]
930
+
931
+ * pluralize helper interprets nil as zero. #6474 [pope]
932
+
933
+ * Fix invalid test fixture exposed by stricter Ruby 1.8.5 multipart parsing. #6524 [Bob Silva]
934
+
935
+ * Set ActionView::Base.default_form_builder once rather than passing the :builder option to every form or overriding the form helper methods. [Jeremy Kemper]
936
+
937
+ * Deprecate expire_matched_fragments. Use expire_fragment instead. #6535 [Bob Silva]
938
+
939
+ * Update to latest Prototype, which doesn't serialize disabled form elements, adds clone() to arrays, empty/non-string Element.update() and adds a fixes excessive error reporting in WebKit beta versions [Thomas Fuchs]
940
+
941
+ * Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from now on. [Rick]
942
+
943
+ * Added block-usage to PrototypeHelper#form_remote_tag, document block-usage of FormTagHelper#form_tag [Rick]
944
+
945
+ * Add a 0 margin/padding div around the hidden _method input tag that form_tag outputs. [Rick]
946
+
947
+ * Added block-usage to TagHelper#content_tag [DHH]. Example:
948
+
949
+ <% content_tag :div, :class => "strong" %>
950
+ Hello world!
951
+ <% end %>
952
+
953
+ Will output:
954
+ <div class="strong">Hello world!</div>
955
+
956
+ * Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true #6409 [BobSilva]
957
+
958
+ * Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) #6421 [BobSilva]
959
+
960
+ * Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets #6454 [BobSilva/chrismear]
961
+
962
+ * Force *_url named routes to show the host in ActionView [Rick]
963
+
964
+ <%= url_for ... %> # no host
965
+ <%= foo_path %> # no host
966
+ <%= foo_url %> # host!
967
+
968
+ * Add support for converting blocks into function arguments to JavaScriptGenerator#call and JavaScriptProxy#call. [Sam Stephenson]
969
+
970
+ * Add JavaScriptGenerator#literal for wrapping a string in an object whose #to_json is the string itself. [Sam Stephenson]
971
+
972
+ * Add <%= escape_once html %> to escape html while leaving any currently escaped entities alone. Fix button_to double-escaping issue. [Rick]
973
+
974
+ * Fix double-escaped entities, such as &amp;amp;, &amp;#123;, etc. [Rick]
975
+
976
+ * Fix deprecation warnings when rendering the template error template. [Nicholas Seckar]
977
+
978
+ * Fix routing to correctly determine when generation fails. Closes #6300. [psross].
979
+
980
+ * Fix broken assert_generates when extra keys are being checked. [Jamis Buck]
981
+
982
+ * Replace KCODE checks with String#chars for truncate. Closes #6385 [Manfred Stienstra]
983
+
984
+ * Make page caching respect the format of the resource that is being requested even if the current route is the default route so that, e.g. posts.rss is not transformed by url_for to '/' and subsequently cached as '/index.html' when it should be cached as '/posts.rss'. [Marcel Molina Jr.]
985
+
986
+ * Use String#chars in TextHelper::excerpt. Closes #6386 [Manfred Stienstra]
987
+
988
+ * Install named routes into ActionView::Base instead of proxying them to the view via helper_method. Closes #5932. [Nicholas Seckar]
989
+
990
+ * Update to latest Prototype and script.aculo.us trunk versions [Thomas Fuchs]
991
+
992
+ * Fix relative URL root matching problems. [Mark Imbriaco]
993
+
994
+ * Fix filter skipping in controller subclasses. #5949, #6297, #6299 [Martin Emde]
995
+
996
+ * render_text may optionally append to the response body. render_javascript appends by default. This allows you to chain multiple render :update calls by setting @performed_render = false between them (awaiting a better public API). [Jeremy Kemper]
997
+
998
+ * Rename test assertion to prevent shadowing. Closes #6306. [psross]
999
+
1000
+ * Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits #6231 [phallstrom]
1001
+
1002
+ * Fixed that FormHelper#radio_button didn't respect an :id being passed in #6266 [evansj]
1003
+
1004
+ * Added an html_options hash parameter to javascript_tag() and update_page_tag() helpers #6311 [tzaharia]. Example:
1005
+
1006
+ update_page_tag :defer => 'true' { |page| ... }
1007
+
1008
+ Gives:
1009
+
1010
+ <script defer="true" type="text/javascript">...</script>
1011
+
1012
+ Which is needed for dealing with the IE6 DOM when it's not yet fully loaded.
1013
+
1014
+ * Fixed that rescue template path shouldn't be hardcoded, then it's easier to hook in your own #6295 [mnaberez]
1015
+
1016
+ * Fixed escaping of backslashes in JavaScriptHelper#escape_javascript #6302 [sven@c3d2.de]
1017
+
1018
+ * Fixed that some 500 rescues would cause 500's themselves because the response had not yet been generated #6329 [cmselmer]
1019
+
1020
+ * respond_to :html doesn't assume .rhtml. #6281 [Hampton Catlin]
1021
+
1022
+ * Fixed some deprecation warnings in ActionPack [Rick Olson]
1023
+
1024
+ * assert_select_rjs decodes escaped unicode chars since the Javascript generators encode them. #6240 [japgolly]
1025
+
1026
+ * Deprecation: @cookies, @headers, @request, @response will be removed after 1.2. Use the corresponding method instead. [Jeremy Kemper]
1027
+
1028
+ * Make the :status parameter expand to the default message for that status code if it is an integer. Also support symbol statuses. [Jamis Buck]. Examples:
1029
+
1030
+ head :status => 404 # expands to "404 Not Found"
1031
+ head :status => :not_found # expands to "404 Not Found"
1032
+ head :status => :created # expands to "201 Created"
1033
+
1034
+ * Add head(options = {}) for responses that have no body. [Jamis Buck]. Examples:
1035
+
1036
+ head :status => 404 # return an empty response with a 404 status
1037
+ head :location => person_path(@person), :status => 201
1038
+
1039
+ * Fix bug that kept any before_filter except the first one from being able to halt the before_filter chain. [Rick Olson]
1040
+
1041
+ * strip_links is case-insensitive. #6285 [tagoh, Bob Silva]
1042
+
1043
+ * Clear the cache of possible controllers whenever Routes are reloaded. [Nicholas Seckar]
1044
+
1045
+ * Filters overhaul including meantime filter support using around filters + blocks. #5949 [Martin Emde, Roman Le Negrate, Stefan Kaes, Jeremy Kemper]
1046
+
1047
+ * Update RJS render tests. [sam]
1048
+
1049
+ * Update CGI process to allow sessions to contain namespaced models. Closes #4638. [dfelstead@site5.com]
1050
+
1051
+ * Fix routing to respect user provided requirements and defaults when assigning default routing options (such as :action => 'index'). Closes #5950. [Nicholas Seckar]
1052
+
1053
+ * Rescue Errno::ECONNRESET to handle an unexpectedly closed socket connection. Improves SCGI reliability. #3368, #6226 [sdsykes, fhanshaw@vesaria.com]
1054
+
1055
+ * Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]. Examples:
1056
+
1057
+ respond_to do |format|
1058
+ format.html { render :text => "I'm being sent as text/html" }
1059
+ format.rss { render :text => "I'm being sent as application/rss+xml" }
1060
+ format.atom { render :text => "I'm being sent as application/xml", :content_type => Mime::XML }
1061
+ end
1062
+
1063
+ * Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH]
1064
+
1065
+ * Added proper getters and setters for content type and charset [DHH]. Example of what we used to do:
1066
+
1067
+ response.headers["Content-Type"] = "application/atom+xml; charset=utf-8"
1068
+
1069
+ ...now:
1070
+
1071
+ response.content_type = Mime::ATOM
1072
+ response.charset = "utf-8"
1073
+
1074
+ * Updated prototype.js to 1.5.0_rc1 with latest fixes. [Rick Olson]
1075
+
1076
+ - XPATH support
1077
+ - Make Form.getElements() return elements in the correct order
1078
+ - fix broken Form.serialize return
1079
+
1080
+ * Declare file extensions exempt from layouts. #6219 [brandon]
1081
+ Example: ActionController::Base.exempt_from_layout 'rpdf'
1082
+
1083
+ * Add chained replace/update support for assert_select_rjs [Rick Olson]
1084
+
1085
+ Given RJS like...
1086
+
1087
+ page['test1'].replace "<div id=\"1\">foo</div>"
1088
+ page['test2'].replace_html "<div id=\"2\">foo</div>"
1089
+
1090
+ Test it with...
1091
+
1092
+ assert_select_rjs :chained_replace
1093
+ assert_select_rjs :chained_replace, "test1"
1094
+
1095
+ assert_select_rjs :chained_replace_html
1096
+ assert_select_rjs :chained_replace_html, "test2"
1097
+
1098
+ * Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. #6132, #6178 [choonkeat@gmail.com]
1099
+
1100
+ * Skip params with empty names, such as the &=Save query string from <input type="submit"/>. #2569 [manfred, raphinou@yahoo.com]
1101
+
1102
+ * Fix assert_tag so that :content => "foo" does not match substrings, but only exact strings. Use :content => /foo/ to match substrings. #2799 [Eric Hodel]
1103
+
1104
+ * Add descriptive messages to the exceptions thrown by cgi_methods. #6091, #6103 [Nicholas Seckar, Bob Silva]
1105
+
1106
+ * Update JavaScriptGenerator#show/hide/toggle/remove to new Prototype syntax for multiple ids, #6068 [petermichaux@gmail.com]
1107
+
1108
+ * Update UrlWriter to support :only_path. [Nicholas Seckar, Dave Thomas]
1109
+
1110
+ * Fixed JavaScriptHelper#link_to_function and JavaScriptHelper#button_to_function to have the script argument be optional [DHH]. So what used to require a nil, like this:
1111
+
1112
+ link_to("Hider", nil, :class => "hider_link") { |p| p[:something].hide }
1113
+
1114
+ ...can be written like this:
1115
+
1116
+ link_to("Hider", :class => "hider_link") { |p| p[:something].hide }
1117
+
1118
+ * Update to script.aculo.us 1.6.3 [Thomas Fuchs]
1119
+
1120
+ * Update to Prototype 1.5.0_rc1 [sam]
1121
+
1122
+ * Added access to nested attributes in RJS #4548 [richcollins@gmail.com]. Examples:
1123
+
1124
+ page['foo']['style'] # => $('foo').style;
1125
+ page['foo']['style']['color'] # => $('blank_slate').style.color;
1126
+ page['foo']['style']['color'] = 'red' # => $('blank_slate').style.color = 'red';
1127
+ page['foo']['style'].color = 'red' # => $('blank_slate').style.color = 'red';
1128
+
1129
+ * Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch]
1130
+
1131
+ * Deprecated the auto-appending of .png to AssetTagHelper#image_tag calls that doesn't have an extension [DHH]
1132
+
1133
+ * Fixed FormOptionsHelper#select to respect :selected value #5813
1134
+
1135
+ * Fixed TextHelper#simple_format to deal with multiple single returns within a single paragraph #5835 [moriq@moriq.com]
1136
+
1137
+ * Fixed TextHelper#pluralize to handle 1 as a string #5909 [rails@bencurtis.com]
1138
+
1139
+ * Improved resolution of DateHelper#distance_of_time_in_words for better precision #5994 [Bob Silva]
1140
+
1141
+ * Changed that uncaught exceptions raised any where in the application will cause RAILS_ROOT/public/500.html to be read and shown instead of just the static "Application error (Rails)" [DHH]
1142
+
1143
+ * Integration tests: thoroughly test ActionController::Integration::Session. #6022 [Kevin Clark]
1144
+ (tests skipped unless you `gem install mocha`)
1145
+
1146
+ * Added deprecation language for pagination which will become a plugin by Rails 2.0 [DHH]
1147
+
1148
+ * Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH]
1149
+
1150
+ * Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH]
1151
+
1152
+ * Added assert_select* for CSS selector-based testing (deprecates assert_tag) #5936 [assaf.arkin@gmail.com]
1153
+
1154
+ * radio_button_tag generates unique id attributes. #3353 [Bob Silva, somekool@gmail.com]
1155
+
1156
+ * strip_tags passes through blank args such as nil or "". #2229, #6702 [duncan@whomwah.com, dharana]
1157
+
1158
+ * Cleanup assert_tag :children counting. #2181 [jamie@bravenet.com]
1159
+
1160
+ * button_to accepts :method so you can PUT and DELETE with it. #6005 [Dan Webb]
1161
+
1162
+ * Update sanitize text helper to strip plaintext tags, and <img src="javascript:bang">. [Rick Olson]
1163
+
1164
+ * Update routing documentation. Closes #6017 [Nathan Witmer]
1165
+
1166
+ * Add routing tests to assert that RoutingError is raised when conditions aren't met. Closes #6016 [Nathan Witmer]
1167
+
1168
+ * Deprecation: update docs. #5998 [jakob@mentalized.net, Kevin Clark]
1169
+
1170
+ * Make auto_link parse a greater subset of valid url formats. [Jamis Buck]
1171
+
1172
+ * Integration tests: headers beginning with X aren't excluded from the HTTP_ prefix, so X-Requested-With becomes HTTP_X_REQUESTED_WITH as expected. [Mike Clark]
1173
+
1174
+ * Tighten rescue clauses. #5985 [james@grayproductions.net]
1175
+
1176
+ * Fix send_data documentation typo. #5982 [brad@madriska.com]
1177
+
1178
+ * Switch to using FormEncodedPairParser for parsing request parameters. [Nicholas Seckar, DHH]
1179
+
1180
+ * respond_to .html now always renders #{action_name}.rhtml so that registered custom template handlers do not override it in priority. Custom mime types require a block and throw proper error now. [Tobias Luetke]
1181
+
1182
+ * Deprecation: test deprecated instance vars in partials. [Jeremy Kemper]
1183
+
1184
+ * Add UrlWriter to allow writing urls from Mailers and scripts. [Nicholas Seckar]
1185
+
1186
+ * Clean up and run the Active Record integration tests by default. #5854 [kevin.clark@gmail.com, Jeremy Kemper]
1187
+
1188
+ * Correct example in cookies docs. #5832 [jessemerriman@warpmail.net]
1189
+
1190
+ * Updated to script.aculo.us 1.6.2 [Thomas Fuchs]
1191
+
1192
+ * Relax Routing's anchor pattern warning; it was preventing use of [^/] inside restrictions. [Nicholas Seckar]
1193
+
1194
+ * Add controller_paths variable to Routing. [Nicholas Seckar]
1195
+
1196
+ * Fix assert_redirected_to issue with named routes for module controllers. [Rick Olson]
1197
+
1198
+ * Tweak RoutingError message to show option diffs, not just missing named route significant keys. [Rick Olson]
1199
+
1200
+ * Invoke method_missing directly on hidden actions. Closes #3030. [Nicholas Seckar]
1201
+
1202
+ * Require Tempfile explicitly for TestUploadedFile due to changes in class auto loading. [Rick Olson]
1203
+
1204
+ * Add RoutingError exception when RouteSet fails to generate a path from a Named Route. [Rick Olson]
1205
+
1206
+ * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
1207
+
1208
+ * Deprecation: check whether instance variables have been monkeyed with before assigning them to deprecation proxies. Raises a RuntimeError if so. [Jeremy Kemper]
1209
+
1210
+ * Add support for the param_name parameter to the auto_complete_field helper. #5026 [david.a.williams@gmail.com]
1211
+
1212
+ * Deprecation! @params, @session, @flash will be removed after 1.2. Use the corresponding instance methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. [Jeremy Kemper]
1213
+
1214
+ * Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [francois.beausoleil@gmail.com]
1215
+
1216
+ * Added months and years to the resolution of DateHelper#distance_of_time_in_words, such that "60 days ago" becomes "2 months ago" #5611 [pjhyett@gmail.com]
1217
+
1218
+ * Short documentation to mention use of Mime::Type.register. #5710 [choonkeat@gmail.com]
1219
+
1220
+ * Make controller_path available as an instance method. #5724 [jmckible@gmail.com]
1221
+
1222
+ * Update query parser to support adjacent hashes. [Nicholas Seckar]
1223
+
1224
+ * Make action caching aware of different formats for the same action so that, e.g. foo.xml is cached separately from foo.html. Implicitly set content type when reading in cached content with mime revealing extensions so the entire onous isn't on the webserver. [Marcel Molina Jr.]
1225
+
1226
+ * Restrict Request Method hacking with ?_method to POST requests. [Rick Olson]
1227
+
1228
+ * Fix bug when passing multiple options to SimplyRestful, like :new => { :preview => :get, :draft => :get }. [Rick Olson, Josh Susser, Lars Pind]
1229
+
1230
+ * Dup the options passed to map.resources so that multiple resources get the same options. [Rick Olson]
1231
+
1232
+ * Fixed the new_#{resource}_url route and added named route tests for Simply Restful. [Rick Olson]
1233
+
1234
+ * Added map.resources from the Simply Restful plugin [DHH]. Examples (the API has changed to use plurals!):
1235
+
1236
+ map.resources :messages
1237
+ map.resources :messages, :comments
1238
+ map.resources :messages, :new => { :preview => :post }
1239
+
1240
+ * Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick]
1241
+
1242
+ * TestRequest#reset_session should restore a TestSession, not a hash [Koz]
1243
+
1244
+ * Don't search a load-path of '.' for controller files [Jamis Buck]
1245
+
1246
+ * Update integration.rb to require test_process explicitly instead of via Dependencies. [Nicholas Seckar]
1247
+
1248
+ * Fixed that you can still access the flash after the flash has been reset in reset_session. Closes #5584 [lmarlow@yahoo.com]
1249
+
1250
+ * Allow form_for and fields_for to work with indexed form inputs. [Jeremy Kemper, Matt Lyon]
1251
+
1252
+ <% form_for 'post[]', @post do |f| -%>
1253
+ <% end -%>
1254
+
1255
+ * Remove leak in development mode by replacing define_method with module_eval. [Nicholas Seckar]
1256
+
1257
+ * Provide support for decimal columns to form helpers. Closes #5672. [dave@pragprog.com]
1258
+
1259
+ * Update documentation for erb trim syntax. #5651 [matt@mattmargolis.net]
1260
+
1261
+ * Pass :id => nil or :class => nil to error_messages_for to supress that html attribute. #3586 [olivier_ansaldi@yahoo.com, sebastien@goetzilla.info]
1262
+
1263
+ * Reset @html_document between requests so assert_tag works. #4810 [jarkko@jlaine.net, easleydp@gmail.com]
1264
+
1265
+ * Update render :partial documentation. #5646 [matt@mattmargolis.net]
1266
+
1267
+ * Integration tests behave well with render_component. #4632 [edward.frederick@revolution.com, dev.rubyonrails@maxdunn.com]
1268
+
1269
+ * Added exception handling of missing layouts #5373 [chris@ozmm.org]
1270
+
1271
+ * Fixed that real files and symlinks should be treated the same when compiling templates #5438 [zachary@panandscan.com]
1272
+
1273
+ * Fixed that the flash should be reset when reset_session is called #5584 [shugo@ruby-lang.org]
1274
+
1275
+ * Added special case for "1 Byte" in NumberHelper#number_to_human_size #5593 [murpyh@rubychan.de]
1276
+
1277
+ * Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH]
1278
+
1279
+ * Add route_name_path method to generate only the path for a named routes. For example, map.person will add person_path. [Nicholas Seckar]
1280
+
1281
+ * Avoid naming collision among compiled view methods. [Jeremy Kemper]
1282
+
1283
+ * Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr]
1284
+
1285
+ * Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de]
1286
+
1287
+ * Fix that routes with *path segments in the recall can generate URLs. [Rick]
1288
+
1289
+ * Fix strip_links so that it doesn't hang on multiline <acronym> tags [Jamis Buck]
1290
+
1291
+ * Remove problematic control chars in rescue template. #5316 [Stefan Kaes]
1292
+
1293
+ * Make sure passed routing options are not mutated by routing code. #5314 [Blair Zajac]
1294
+
1295
+ * Make sure changing the controller from foo/bar to bing/bang does not change relative to foo. [Jamis Buck]
1296
+
1297
+ * Escape the path before routing recognition. #3671
1298
+
1299
+ * Make sure :id and friends are unescaped properly. #5275 [me@julik.nl]
1300
+
1301
+ * Fix documentation for with_routing to reflect new reality. #5281 [rramdas@gmail.com]
1302
+
1303
+ * Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). #210 [mklame@atxeu.com, matthew@walker.wattle.id.au]
1304
+
1305
+ * Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH]
1306
+
1307
+ * Added Mime::Type.register(string, symbol, synonyms = []) for adding new custom mime types [DHH]. Example: Mime::Type.register("image/gif", :gif)
1308
+
1309
+ * Added support for Mime objects in render :content_type option [DHH]. Example: render :text => some_atom, :content_type => Mime::ATOM
1310
+
1311
+ * Add :status option to send_data and send_file. Defaults to '200 OK'. #5243 [Manfred Stienstra <m.stienstra@fngtps.com>]
1312
+
1313
+ * Routing rewrite. Simpler, faster, easier to understand. The published API for config/routes.rb is unchanged, but nearly everything else is different, so expect breakage in plugins and libs that try to fiddle with routes. [Nicholas Seckar, Jamis Buck]
1314
+
1315
+ map.connect '/foo/:id', :controller => '...', :action => '...'
1316
+ map.connect '/foo/:id.:format', :controller => '...', :action => '...'
1317
+ map.connect '/foo/:id', ..., :conditions => { :method => :get }
1318
+
1319
+ * Cope with missing content type and length headers. Parse parameters from multipart and urlencoded request bodies only. [Jeremy Kemper]
1320
+
1321
+ * Accept multipart PUT parameters. #5235 [guy.naor@famundo.com]
1322
+
1323
+ * Added interrogation of params[:format] to determine Accept type. If :format is specified and matches a declared extension, like "rss" or "xml", that mime type will be put in front of the accept handler. This means you can link to the same action from different extensions and use that fact to determine output [DHH]. Example:
1324
+
1325
+ class WeblogController < ActionController::Base
1326
+ def index
1327
+ @posts = Post.find :all
1328
+
1329
+ respond_to do |format|
1330
+ format.html
1331
+ format.xml { render :xml => @posts.to_xml }
1332
+ format.rss { render :action => "feed.rxml" }
1333
+ end
1334
+ end
1335
+ end
1336
+
1337
+ # returns HTML when requested by a browser, since the browser
1338
+ # has the HTML mimetype at the top of its priority list
1339
+ Accept: text/html
1340
+ GET /weblog
1341
+
1342
+ # returns the XML
1343
+ Accept: application/xml
1344
+ GET /weblog
1345
+
1346
+ # returns the HTML
1347
+ Accept: application/xml
1348
+ GET /weblog.html
1349
+
1350
+ # returns the XML
1351
+ Accept: text/html
1352
+ GET /weblog.xml
1353
+
1354
+ All this relies on the fact that you have a route that includes .:format.
1355
+
1356
+ * Expanded :method option in FormTagHelper#form_tag, FormHelper#form_for, PrototypeHelper#remote_form_for, PrototypeHelper#remote_form_tag, and PrototypeHelper#link_to_remote to allow for verbs other than GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH]
1357
+
1358
+ * Added :method option to UrlHelper#link_to, which allows for using other verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH]
1359
+
1360
+ * follow_redirect doesn't complain about being redirected to the same controller. #5153 [dymo@mk.ukrtelecom.ua]
1361
+
1362
+ * Add layout attribute to response object with the name of the layout that was rendered, or nil if none rendered. [Kevin Clark kevin.clark@gmail.com]
1363
+
1364
+ * Fix NoMethodError when parsing params like &&. [Adam Greenfield]
1365
+
1366
+ * Fix flip flopped logic in docs for url_for's :only_path option. Closes #4998. [esad@esse.at]
1367
+
1368
+ * form.text_area handles the :size option just like the original text_area (:size => '60x10' becomes cols="60" rows="10"). [Jeremy Kemper]
1369
+
1370
+ * Excise ingrown code from FormOptionsHelper#options_for_select. #5008 [anonymous]
1371
+
1372
+ * Small fix in routing to allow dynamic routes (broken after [4242]) [Rick]
1373
+
1374
+ map.connect '*path', :controller => 'files', :action => 'show'
1375
+
1376
+ * Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
1377
+
1378
+ * Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
1379
+
1380
+ * Use #flush between switching from #write to #syswrite. Closes #4907. [Blair Zajac <blair@orcaware.com>]
1381
+
1382
+ * Documentation fix: integration test scripts don't require integration_test. Closes #4914. [Frederick Ros <sl33p3r@free.fr>]
1383
+
1384
+ * ActionController::Base Summary documentation rewrite. Closes #4900. [kevin.clark@gmail.com]
1385
+
1386
+ * Fix text_helper.rb documentation rendering. Closes #4725. [Frederick Ros]
1387
+
1388
+ * Fixes bad rendering of JavaScriptMacrosHelper rdoc (closes #4910) [Frederick Ros]
1389
+
1390
+ * Allow error_messages_for to report errors for multiple objects, as well as support for customizing the name of the object in the error summary header. Closes #4186. [andrew@redlinesoftware.com, Marcel Molina Jr.]
1391
+
1392
+ error_messages_for :account, :user, :subscription, :object_name => :account
1393
+
1394
+ * Enhance documentation for setting headers in integration tests. Skip auto HTTP prepending when its already there. Closes #4079. [Rick Olson]
1395
+
1396
+ * Documentation for AbstractRequest. Closes #4895. [kevin.clark@gmail.com]
1397
+
1398
+ * Refactor various InstanceTag instance method to class methods. Closes #4800. [skaes@web.de]
1399
+
1400
+ * Remove all remaining references to @params in the documentation. [Marcel Molina Jr.]
1401
+
1402
+ * Add documentation for redirect_to :back's RedirectBackError exception. [Marcel Molina Jr.]
1403
+
1404
+ * Update layout and content_for documentation to use yield rather than magic @content_for instance variables. [Marcel Molina Jr.]
1405
+
1406
+ * Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick]
1407
+
1408
+ redirect_to :action => 'new'
1409
+ assert_redirected_to :controller => 'monkeys', :action => 'new'
1410
+
1411
+ * Cache CgiRequest#request_parameters so that multiple calls don't re-parse multipart data. [Rick]
1412
+
1413
+ * Diff compared routing options. Allow #assert_recognizes to take a second arg as a hash to specify optional request method [Rick]
1414
+
1415
+ assert_recognizes({:controller => 'users', :action => 'index'}, 'users')
1416
+ assert_recognizes({:controller => 'users', :action => 'create'}, {:path => 'users', :method => :post})
1417
+
1418
+ * Diff compared options with #assert_redirected_to [Rick]
1419
+
1420
+ * Add support in routes for semicolon delimited "subpaths", like /books/:id;:action [Jamis Buck]
1421
+
1422
+ * Change link_to_function and button_to_function to (optionally) take an update_page block instead of a JavaScript string. Closes #4804. [zraii@comcast.net, Sam Stephenson]
1423
+
1424
+ * Fixed that remote_form_for can leave out the object parameter and default to the instance variable of the object_name, just like form_for [DHH]
1425
+
1426
+ * Modify routing so that you can say :require => { :method => :post } for a route, and the route will never be selected unless the request method is POST. Only works for route recognition, not for route generation. [Jamis Buck]
1427
+
1428
+ * Added :add_headers option to verify which merges a hash of name/value pairs into the response's headers hash if the prerequisites cannot be satisfied. [Sam Stephenson]
1429
+ ex. verify :only => :speak, :method => :post,
1430
+ :render => { :status => 405, :text => "Must be post" },
1431
+ :add_headers => { "Allow" => "POST" }
1432
+
1433
+ * Added ActionController.filter_parameter_logging that makes it easy to remove passwords, credit card numbers, and other sensitive information from being logged when a request is handled #1897 [jeremye@bsa.ca.gov]
54
1434
 
55
1435
 
56
1436
  *1.13.3* (March 12th, 2007)
57
1437
 
58
- * Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. #6752 [Nicholas Seckar]
1438
+ * Apply [5709] to stable.
59
1439
 
60
1440
  * session_enabled? works with session :off. #6680 [Catfish]
61
1441
 
@@ -495,7 +1875,7 @@
495
1875
 
496
1876
  * Avoid naming collision among compiled view methods. [Jeremy Kemper]
497
1877
 
498
- * Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [Mislav Marohnic]
1878
+ * Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr]
499
1879
 
500
1880
  * Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de]
501
1881
 
@@ -2382,7 +3762,7 @@ Default YAML web services were retired, ActionController::Base.param_parsers car
2382
3762
 
2383
3763
  * Fixed all helpers so that they use XHTML compliant double quotes for values instead of single quotes [htonl/bitsweat]
2384
3764
 
2385
- * Added link_to_image(src, options = {}, html_options = {}, *parameters_for_method_reference). Documentation:
3765
+ * Added link_to_image(src, options = {}, html_options = {}). Documentation:
2386
3766
 
2387
3767
  Creates a link tag to the image residing at the +src+ using an URL created by the set of +options+. See the valid options in
2388
3768
  link:classes/ActionController/Base.html#M000021. It's also possible to pass a string instead of an options hash to