actionpack 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +45 -0
- data/MIT-LICENSE +1 -1
- data/README +7 -7
- data/Rakefile +2 -2
- data/lib/action_controller.rb +2 -2
- data/lib/action_controller/assertions/response_assertions.rb +18 -9
- data/lib/action_controller/base.rb +14 -14
- data/lib/action_controller/caching/fragments.rb +6 -6
- data/lib/action_controller/cookies.rb +96 -0
- data/lib/action_controller/failsafe.rb +1 -0
- data/lib/action_controller/flash.rb +42 -0
- data/lib/action_controller/integration.rb +5 -1
- data/lib/action_controller/polymorphic_routes.rb +1 -1
- data/lib/action_controller/rack_lint_patch.rb +1 -1
- data/lib/action_controller/rescue.rb +2 -2
- data/lib/action_controller/response.rb +4 -7
- data/lib/action_controller/routing/route_set.rb +1 -0
- data/lib/action_controller/session/abstract_store.rb +6 -0
- data/lib/action_controller/session/cookie_store.rb +6 -0
- data/lib/action_controller/templates/rescues/_trace.erb +2 -2
- data/lib/action_controller/url_rewriter.rb +4 -1
- data/lib/action_pack.rb +1 -1
- data/lib/action_pack/version.rb +1 -1
- data/lib/action_view.rb +3 -3
- data/lib/action_view/helpers/active_record_helper.rb +11 -11
- data/lib/action_view/helpers/asset_tag_helper.rb +2 -2
- data/lib/action_view/helpers/capture_helper.rb +2 -2
- data/lib/action_view/helpers/date_helper.rb +12 -11
- data/lib/action_view/helpers/debug_helper.rb +2 -2
- data/lib/action_view/helpers/form_helper.rb +49 -12
- data/lib/action_view/helpers/form_options_helper.rb +3 -4
- data/lib/action_view/helpers/form_tag_helper.rb +7 -4
- data/lib/action_view/helpers/javascript_helper.rb +1 -1
- data/lib/action_view/helpers/number_helper.rb +1 -1
- data/lib/action_view/helpers/prototype_helper.rb +2 -2
- data/lib/action_view/helpers/raw_output_helper.rb +2 -2
- data/lib/action_view/helpers/sanitize_helper.rb +2 -10
- data/lib/action_view/helpers/tag_helper.rb +6 -5
- data/lib/action_view/helpers/text_helper.rb +5 -5
- data/lib/action_view/helpers/translation_helper.rb +6 -4
- data/lib/action_view/helpers/url_helper.rb +9 -11
- data/lib/action_view/partials.rb +2 -1
- data/lib/action_view/paths.rb +8 -0
- data/lib/action_view/renderable.rb +16 -2
- data/lib/action_view/template_handlers/erb.rb +3 -5
- data/lib/action_view/test_case.rb +2 -2
- data/test/abstract_unit.rb +3 -3
- data/test/controller/action_pack_assertions_test.rb +3 -1
- data/test/controller/assert_select_test.rb +1 -0
- data/test/controller/caching_test.rb +16 -2
- data/test/controller/cookie_test.rb +37 -1
- data/test/controller/flash_test.rb +28 -1
- data/test/controller/integration_test.rb +0 -1
- data/test/controller/localized_templates_test.rb +24 -0
- data/test/controller/output_escaping_test.rb +19 -0
- data/test/controller/rack_test.rb +1 -4
- data/test/controller/render_test.rb +11 -2
- data/test/controller/rescue_test.rb +8 -2
- data/test/controller/routing_test.rb +1 -0
- data/test/controller/send_file_test.rb +1 -1
- data/test/controller/session/cookie_store_test.rb +2 -2
- data/test/controller/url_rewriter_test.rb +10 -6
- data/test/fixtures/localized/hello_world.de.html +1 -0
- data/test/fixtures/localized/hello_world.en.html +1 -0
- data/test/fixtures/test/_customer_counter_with_as.erb +1 -0
- data/test/fixtures/test/_utf8_partial.html.erb +1 -0
- data/test/fixtures/test/_utf8_partial_magic.html.erb +2 -0
- data/test/fixtures/test/array_translation.erb +1 -0
- data/test/fixtures/test/scoped_array_translation.erb +1 -0
- data/test/fixtures/test/utf8.html.erb +4 -2
- data/test/fixtures/test/utf8_magic.html.erb +5 -0
- data/test/fixtures/test/utf8_magic_with_bare_partial.html.erb +5 -0
- data/test/template/active_record_helper_i18n_test.rb +9 -2
- data/test/template/asset_tag_helper_test.rb +0 -1
- data/test/template/date_helper_test.rb +118 -0
- data/test/template/erb_util_test.rb +12 -0
- data/test/template/form_helper_test.rb +57 -3
- data/test/template/form_tag_helper_test.rb +15 -9
- data/test/template/render_test.rb +47 -8
- data/test/template/text_helper_test.rb +26 -1
- data/test/template/translation_helper_test.rb +20 -2
- data/test/template/url_helper_test.rb +20 -1
- data/test/tmp/RackMultipart20100114-2850-18awt99-0 +1 -0
- data/test/tmp/RackMultipart20100114-2850-19mxvfk-0 +0 -0
- data/test/tmp/RackMultipart20100114-2850-1il5j9y-0 +1 -0
- data/test/tmp/RackMultipart20100114-2850-1kr4fph-0 +1 -0
- data/test/tmp/RackMultipart20100114-2850-1whjzgd-0 +0 -0
- data/test/tmp/RackMultipart20100114-2850-2oxu19-0 +1 -0
- data/test/tmp/RackMultipart20100114-2850-34lp5r-0 +0 -0
- data/test/tmp/RackMultipart20100114-2850-bqfazg-0 +1 -0
- data/test/tmp/RackMultipart20100114-2850-vbyi8g-0 +0 -0
- data/test/tmp/RackMultipart20100127-16318-140g9v4-0 +1 -0
- data/test/tmp/RackMultipart20100127-16318-1gc081d-0 +0 -0
- data/test/tmp/RackMultipart20100127-16318-1hs9edk-0 +0 -0
- data/test/tmp/RackMultipart20100127-16318-1xv7yvp-0 +1 -0
- data/test/tmp/RackMultipart20100127-16318-9eyfmo-0 +1 -0
- data/test/tmp/RackMultipart20100127-16318-o81drl-0 +0 -0
- data/test/tmp/RackMultipart20100127-16318-ubd6vm-0 +1 -0
- data/test/tmp/RackMultipart20100127-16318-xltjpf-0 +1 -0
- data/test/tmp/RackMultipart20100127-16318-z0s5v6-0 +0 -0
- data/test/tmp/RackMultipart20100131-1041-1fpxdo1-0 +1 -0
- data/test/tmp/RackMultipart20100131-1041-1hgld51-0 +1 -0
- data/test/tmp/RackMultipart20100131-1041-1sfw61g-0 +0 -0
- data/test/tmp/RackMultipart20100131-1041-1txiwx-0 +0 -0
- data/test/tmp/RackMultipart20100131-1041-3nxhtk-0 +1 -0
- data/test/tmp/RackMultipart20100131-1041-msmvjp-0 +1 -0
- data/test/tmp/RackMultipart20100131-1041-snlih6-0 +0 -0
- data/test/tmp/RackMultipart20100131-1041-utmx6r-0 +1 -0
- data/test/tmp/RackMultipart20100131-1041-vr2eir-0 +0 -0
- data/test/tmp/RackMultipart20100131-1200-116kivk-0 +1 -0
- data/test/tmp/RackMultipart20100131-1200-13yj0g7-0 +0 -0
- data/test/tmp/RackMultipart20100131-1200-1b0awcl-0 +1 -0
- data/test/tmp/RackMultipart20100131-1200-1qc4a1o-0 +0 -0
- data/test/tmp/RackMultipart20100131-1200-1sch05j-0 +1 -0
- data/test/tmp/RackMultipart20100131-1200-2wwvjw-0 +1 -0
- data/test/tmp/RackMultipart20100131-1200-4ybied-0 +0 -0
- data/test/tmp/RackMultipart20100131-1200-n4jwgg-0 +0 -0
- data/test/tmp/RackMultipart20100131-1200-nqwg4i-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-10hgtsj-0 +0 -0
- data/test/tmp/RackMultipart20100131-1566-1m2ix3r-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-1szdt3p-0 +0 -0
- data/test/tmp/RackMultipart20100131-1566-6cb9xb-0 +0 -0
- data/test/tmp/RackMultipart20100131-1566-aervb6-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-o57d30-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-q06s4u-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-r3eau5-0 +1 -0
- data/test/tmp/RackMultipart20100131-1566-rhvbsr-0 +0 -0
- data/test/tmp/RackMultipart20100131-2176-19tk67i-0 +0 -0
- data/test/tmp/RackMultipart20100131-2176-1iuhegu-0 +0 -0
- data/test/tmp/RackMultipart20100131-2176-1mfu303-0 +1 -0
- data/test/tmp/RackMultipart20100131-2176-1qv96rf-0 +1 -0
- data/test/tmp/RackMultipart20100131-2176-7rae4i-0 +1 -0
- data/test/tmp/RackMultipart20100131-2176-g7hqdt-0 +0 -0
- data/test/tmp/RackMultipart20100131-2176-spxexk-0 +1 -0
- data/test/tmp/RackMultipart20100131-2176-x57r68-0 +0 -0
- data/test/tmp/RackMultipart20100131-2176-xx8aqr-0 +1 -0
- data/test/tmp/RackMultipart20100131-2251-1kx4y7u-0 +1 -0
- data/test/tmp/RackMultipart20100131-2251-1p70d6c-0 +1 -0
- data/test/tmp/RackMultipart20100131-2251-1w181g4-0 +1 -0
- data/test/tmp/RackMultipart20100131-2251-9dl2hy-0 +1 -0
- data/test/tmp/RackMultipart20100131-2251-dd4aqa-0 +0 -0
- data/test/tmp/RackMultipart20100131-2251-dq1bs7-0 +0 -0
- data/test/tmp/RackMultipart20100131-2251-rjlwid-0 +0 -0
- data/test/tmp/RackMultipart20100131-2251-svv2my-0 +0 -0
- data/test/tmp/RackMultipart20100131-2251-znyywm-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-1b9atyq-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-1j4bk06-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-1nd3jkk-0 +0 -0
- data/test/tmp/RackMultipart20100131-2563-1ud0b43-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-2t9aus-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-4xhtq9-0 +0 -0
- data/test/tmp/RackMultipart20100131-2563-80xjuq-0 +1 -0
- data/test/tmp/RackMultipart20100131-2563-du6204-0 +0 -0
- data/test/tmp/RackMultipart20100131-2563-m2xw0u-0 +0 -0
- data/test/tmp/RackMultipart20100131-3324-1bz902a-0 +1 -0
- data/test/tmp/RackMultipart20100131-3324-1cj3c2q-0 +1 -0
- data/test/tmp/RackMultipart20100131-3324-1dcwnmh-0 +1 -0
- data/test/tmp/RackMultipart20100131-3324-1qu1vvo-0 +1 -0
- data/test/tmp/RackMultipart20100131-3324-1wksfd7-0 +0 -0
- data/test/tmp/RackMultipart20100131-3324-8bmth5-0 +0 -0
- data/test/tmp/RackMultipart20100131-3324-c0sen5-0 +1 -0
- data/test/tmp/RackMultipart20100131-3324-mhg9zb-0 +0 -0
- data/test/tmp/RackMultipart20100131-3324-mram2k-0 +0 -0
- data/test/tmp/RackMultipart20100131-3712-11l26yb-0 +1 -0
- data/test/tmp/RackMultipart20100131-3712-18qhzz9-0 +1 -0
- data/test/tmp/RackMultipart20100131-3712-19efkti-0 +1 -0
- data/test/tmp/RackMultipart20100131-3712-1s6qbc-0 +1 -0
- data/test/tmp/RackMultipart20100131-3712-948hce-0 +0 -0
- data/test/tmp/RackMultipart20100131-3712-rliyfc-0 +0 -0
- data/test/tmp/RackMultipart20100131-3712-tvfxgh-0 +1 -0
- data/test/tmp/RackMultipart20100131-3712-ywjidy-0 +0 -0
- data/test/tmp/RackMultipart20100131-3712-zwa1yl-0 +0 -0
- data/test/tmp/RackMultipart20100131-4098-12u1n7m-0 +1 -0
- data/test/tmp/RackMultipart20100131-4098-188dwav-0 +0 -0
- data/test/tmp/RackMultipart20100131-4098-1a2nulg-0 +0 -0
- data/test/tmp/RackMultipart20100131-4098-1c9gbau-0 +1 -0
- data/test/tmp/RackMultipart20100131-4098-2923tu-0 +0 -0
- data/test/tmp/RackMultipart20100131-4098-he7nm8-0 +0 -0
- data/test/tmp/RackMultipart20100131-4098-nw5pcp-0 +1 -0
- data/test/tmp/RackMultipart20100131-4098-plj7cd-0 +1 -0
- data/test/tmp/RackMultipart20100131-4098-wha9du-0 +1 -0
- data/test/tmp/RackMultipart20100131-4178-10rjsef-0 +0 -0
- data/test/tmp/RackMultipart20100131-4178-13qqazs-0 +0 -0
- data/test/tmp/RackMultipart20100131-4178-1hpjqkl-0 +0 -0
- data/test/tmp/RackMultipart20100131-4178-1idjtdl-0 +1 -0
- data/test/tmp/RackMultipart20100131-4178-1ke1zpq-0 +1 -0
- data/test/tmp/RackMultipart20100131-4178-6y51hb-0 +1 -0
- data/test/tmp/RackMultipart20100131-4178-98i2o0-0 +1 -0
- data/test/tmp/RackMultipart20100131-4178-9k4jj6-0 +0 -0
- data/test/tmp/RackMultipart20100131-4178-zcxa4g-0 +1 -0
- data/test/tmp/RackMultipart20100131-4297-1moo7v9-0 +0 -0
- data/test/tmp/RackMultipart20100131-4297-1yxib1r-0 +0 -0
- data/test/tmp/RackMultipart20100131-4297-b239su-0 +0 -0
- data/test/tmp/RackMultipart20100131-4297-ht0qby-0 +1 -0
- data/test/tmp/RackMultipart20100131-4297-ia5rov-0 +1 -0
- data/test/tmp/RackMultipart20100131-4297-m6gof0-0 +1 -0
- data/test/tmp/RackMultipart20100131-4297-nm3rvt-0 +0 -0
- data/test/tmp/RackMultipart20100131-4297-qla73p-0 +1 -0
- data/test/tmp/RackMultipart20100131-4297-ylrtmu-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-11fsv9d-0 +0 -0
- data/test/tmp/RackMultipart20100131-4434-19ycsmr-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-1h0ws4q-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-1lszvv8-0 +0 -0
- data/test/tmp/RackMultipart20100131-4434-1ocgqu3-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-1ukqdfd-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-cq7rvl-0 +1 -0
- data/test/tmp/RackMultipart20100131-4434-f7jbl4-0 +0 -0
- data/test/tmp/RackMultipart20100131-4434-vxlg5t-0 +0 -0
- data/test/tmp/RackMultipart20100131-4544-1bf8inz-0 +1 -0
- data/test/tmp/RackMultipart20100131-4544-1vj44nb-0 +0 -0
- data/test/tmp/RackMultipart20100131-4544-20mdip-0 +1 -0
- data/test/tmp/RackMultipart20100131-4544-89y67y-0 +0 -0
- data/test/tmp/RackMultipart20100131-4544-gdbsui-0 +1 -0
- data/test/tmp/RackMultipart20100131-4544-ko8plt-0 +0 -0
- data/test/tmp/RackMultipart20100131-4544-ojykbo-0 +1 -0
- data/test/tmp/RackMultipart20100131-4544-r8sahr-0 +0 -0
- data/test/tmp/RackMultipart20100131-4544-uluv8k-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-11ovmuw-0 +0 -0
- data/test/tmp/RackMultipart20100131-4655-12iht5p-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-142j0ug-0 +0 -0
- data/test/tmp/RackMultipart20100131-4655-15affqj-0 +0 -0
- data/test/tmp/RackMultipart20100131-4655-1gv4gb4-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-1gwchw7-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-1hvqx5t-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-1jhgk7a-0 +1 -0
- data/test/tmp/RackMultipart20100131-4655-1yktury-0 +0 -0
- data/test/tmp/RackMultipart20100131-5244-13z86ip-0 +0 -0
- data/test/tmp/RackMultipart20100131-5244-17vpiv6-0 +0 -0
- data/test/tmp/RackMultipart20100131-5244-1a9w3e-0 +1 -0
- data/test/tmp/RackMultipart20100131-5244-1ox8g0l-0 +1 -0
- data/test/tmp/RackMultipart20100131-5244-1qrzlqz-0 +1 -0
- data/test/tmp/RackMultipart20100131-5244-g3mpli-0 +0 -0
- data/test/tmp/RackMultipart20100131-5244-gcl80c-0 +0 -0
- data/test/tmp/RackMultipart20100131-5244-jqk7el-0 +1 -0
- data/test/tmp/RackMultipart20100131-5244-st1ldm-0 +1 -0
- data/test/tmp/RackMultipart20100131-5383-10si01q-0 +0 -0
- data/test/tmp/RackMultipart20100131-5383-16ye4w3-0 +1 -0
- data/test/tmp/RackMultipart20100131-5383-1imlta8-0 +0 -0
- data/test/tmp/RackMultipart20100131-5383-1r3gvaw-0 +0 -0
- data/test/tmp/RackMultipart20100131-5383-3wialw-0 +1 -0
- data/test/tmp/RackMultipart20100131-5383-k16uor-0 +1 -0
- data/test/tmp/RackMultipart20100131-5383-oz1b3a-0 +0 -0
- data/test/tmp/RackMultipart20100131-5383-una84e-0 +1 -0
- data/test/tmp/RackMultipart20100131-5383-zk1hmz-0 +1 -0
- data/test/tmp/RackMultipart20100131-5711-12j0qy5-0 +1 -0
- data/test/tmp/RackMultipart20100131-5711-1cozdic-0 +0 -0
- data/test/tmp/RackMultipart20100131-5711-1kebrgm-0 +0 -0
- data/test/tmp/RackMultipart20100131-5711-1q3jt9q-0 +0 -0
- data/test/tmp/RackMultipart20100131-5711-6sv1xg-0 +1 -0
- data/test/tmp/RackMultipart20100131-5711-esxrbg-0 +0 -0
- data/test/tmp/RackMultipart20100131-5711-jfbr34-0 +1 -0
- data/test/tmp/RackMultipart20100131-5711-q1e91g-0 +1 -0
- data/test/tmp/RackMultipart20100131-5711-tdauxm-0 +1 -0
- data/test/tmp/RackMultipart20100131-91110-1196t1f-0 +1 -0
- data/test/tmp/RackMultipart20100131-91110-11tfgc4-0 +1 -0
- data/test/tmp/RackMultipart20100131-91110-19e4l6u-0 +0 -0
- data/test/tmp/RackMultipart20100131-91110-1m6i8r4-0 +0 -0
- data/test/tmp/RackMultipart20100131-91110-1nv9cn8-0 +1 -0
- data/test/tmp/RackMultipart20100131-91110-6gbf58-0 +0 -0
- data/test/tmp/RackMultipart20100131-91110-b7iewa-0 +1 -0
- data/test/tmp/RackMultipart20100131-91110-b8kbab-0 +0 -0
- data/test/tmp/RackMultipart20100131-91110-rq2ytl-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-1848spe-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-1u8xsmd-0 +0 -0
- data/test/tmp/RackMultipart20100131-91876-1vlruve-0 +0 -0
- data/test/tmp/RackMultipart20100131-91876-cbcvg1-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-jv0zd7-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-laype7-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-mswlj3-0 +1 -0
- data/test/tmp/RackMultipart20100131-91876-se56ms-0 +0 -0
- data/test/tmp/RackMultipart20100131-91876-t14psz-0 +0 -0
- data/test/tmp/RackMultipart20100131-93665-1cv0oop-0 +1 -0
- data/test/tmp/RackMultipart20100131-93665-1n0c582-0 +0 -0
- data/test/tmp/RackMultipart20100131-93665-1obpgzg-0 +1 -0
- data/test/tmp/RackMultipart20100131-93665-1pgbkl0-0 +1 -0
- data/test/tmp/RackMultipart20100131-93665-1udk862-0 +1 -0
- data/test/tmp/RackMultipart20100131-93665-9xxo6q-0 +0 -0
- data/test/tmp/RackMultipart20100131-93665-eawsec-0 +0 -0
- data/test/tmp/RackMultipart20100131-93665-g5rmm9-0 +0 -0
- data/test/tmp/RackMultipart20100131-93665-kdm9y0-0 +1 -0
- data/test/tmp/RackMultipart20100131-96270-10h26kt-0 +0 -0
- data/test/tmp/RackMultipart20100131-96270-1dtgwke-0 +1 -0
- data/test/tmp/RackMultipart20100131-96270-1pib5qg-0 +0 -0
- data/test/tmp/RackMultipart20100131-96270-1tfonee-0 +1 -0
- data/test/tmp/RackMultipart20100131-96270-1xoj9si-0 +0 -0
- data/test/tmp/RackMultipart20100131-96270-5kzssn-0 +0 -0
- data/test/tmp/RackMultipart20100131-96270-5qgi09-0 +1 -0
- data/test/tmp/RackMultipart20100131-96270-dlgdff-0 +1 -0
- data/test/tmp/RackMultipart20100131-96270-uky8ij-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-140mlqp-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-16du1gs-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-181k6zk-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-1f1xgl8-0 +0 -0
- data/test/tmp/RackMultipart20100131-96373-1v4tnat-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-5iwxty-0 +0 -0
- data/test/tmp/RackMultipart20100131-96373-nrglr4-0 +1 -0
- data/test/tmp/RackMultipart20100131-96373-tj67zf-0 +0 -0
- data/test/tmp/RackMultipart20100131-96373-y7mw5e-0 +0 -0
- data/test/tmp/RackMultipart20100131-96488-1c52jwo-0 +0 -0
- data/test/tmp/RackMultipart20100131-96488-1g4n5g3-0 +0 -0
- data/test/tmp/RackMultipart20100131-96488-1ih9vjx-0 +1 -0
- data/test/tmp/RackMultipart20100131-96488-1m67bqh-0 +1 -0
- data/test/tmp/RackMultipart20100131-96488-1sff2qf-0 +1 -0
- data/test/tmp/RackMultipart20100131-96488-1vxr0sz-0 +0 -0
- data/test/tmp/RackMultipart20100131-96488-f1va0r-0 +1 -0
- data/test/tmp/RackMultipart20100131-96488-godmi4-0 +0 -0
- data/test/tmp/RackMultipart20100131-96488-v7puqu-0 +1 -0
- data/test/tmp/RackMultipart20100131-96889-10srx2y-0 +1 -0
- data/test/tmp/RackMultipart20100131-96889-14sujbg-0 +1 -0
- data/test/tmp/RackMultipart20100131-96889-1edgzzr-0 +0 -0
- data/test/tmp/RackMultipart20100131-96889-1jtlvx0-0 +0 -0
- data/test/tmp/RackMultipart20100131-96889-1leo16l-0 +0 -0
- data/test/tmp/RackMultipart20100131-96889-1nroez0-0 +0 -0
- data/test/tmp/RackMultipart20100131-96889-2z4au4-0 +1 -0
- data/test/tmp/RackMultipart20100131-96889-v6dj39-0 +1 -0
- data/test/tmp/RackMultipart20100131-96889-z2owq5-0 +1 -0
- data/test/tmp/RackMultipart20100131-97178-1kzzmnx-0 +0 -0
- data/test/tmp/RackMultipart20100131-97178-1p48git-0 +0 -0
- data/test/tmp/RackMultipart20100131-97178-1pak2jq-0 +0 -0
- data/test/tmp/RackMultipart20100131-97178-1vb21z0-0 +1 -0
- data/test/tmp/RackMultipart20100131-97178-3pstpf-0 +1 -0
- data/test/tmp/RackMultipart20100131-97178-ah9j8g-0 +0 -0
- data/test/tmp/RackMultipart20100131-97178-dzgylu-0 +1 -0
- data/test/tmp/RackMultipart20100131-97178-eh8uuk-0 +1 -0
- data/test/tmp/RackMultipart20100131-97178-mompd7-0 +1 -0
- data/test/tmp/RackMultipart20100131-97404-11op195-0 +0 -0
- data/test/tmp/RackMultipart20100131-97404-15vgv5a-0 +0 -0
- data/test/tmp/RackMultipart20100131-97404-1ipzwm0-0 +1 -0
- data/test/tmp/RackMultipart20100131-97404-1je7x2p-0 +1 -0
- data/test/tmp/RackMultipart20100131-97404-1mb6juq-0 +0 -0
- data/test/tmp/RackMultipart20100131-97404-1uhf75x-0 +1 -0
- data/test/tmp/RackMultipart20100131-97404-4bkht5-0 +0 -0
- data/test/tmp/RackMultipart20100131-97404-8wsyqb-0 +1 -0
- data/test/tmp/RackMultipart20100131-97404-p5bwvt-0 +1 -0
- data/test/tmp/RackMultipart20100131-97860-134h0yk-0 +1 -0
- data/test/tmp/RackMultipart20100131-97860-137z1v8-0 +1 -0
- data/test/tmp/RackMultipart20100131-97860-1fxatvg-0 +1 -0
- data/test/tmp/RackMultipart20100131-97860-1rkrzj1-0 +0 -0
- data/test/tmp/RackMultipart20100131-97860-5aahhh-0 +0 -0
- data/test/tmp/RackMultipart20100131-97860-bk11df-0 +0 -0
- data/test/tmp/RackMultipart20100131-97860-bpt71-0 +0 -0
- data/test/tmp/RackMultipart20100131-97860-k5kib2-0 +1 -0
- data/test/tmp/RackMultipart20100131-97860-yj6uro-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-12zytln-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-1hpjwgc-0 +0 -0
- data/test/tmp/RackMultipart20100131-97900-1kuj8ok-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-1wtlnbe-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-66d1fg-0 +0 -0
- data/test/tmp/RackMultipart20100131-97900-m7hm3n-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-n2a8fd-0 +0 -0
- data/test/tmp/RackMultipart20100131-97900-y9kwnp-0 +1 -0
- data/test/tmp/RackMultipart20100131-97900-yu52kd-0 +0 -0
- data/test/tmp/RackMultipart20100131-97937-1fxbun8-0 +1 -0
- data/test/tmp/RackMultipart20100131-97937-1qjxhia-0 +1 -0
- data/test/tmp/RackMultipart20100131-97937-1vwp4fj-0 +1 -0
- data/test/tmp/RackMultipart20100131-97937-aha3dl-0 +0 -0
- data/test/tmp/RackMultipart20100131-97937-asyrei-0 +1 -0
- data/test/tmp/RackMultipart20100131-97937-d8rmsv-0 +1 -0
- data/test/tmp/RackMultipart20100131-97937-g9oy2w-0 +0 -0
- data/test/tmp/RackMultipart20100131-97937-lt544p-0 +0 -0
- data/test/tmp/RackMultipart20100131-97937-mgf4qa-0 +0 -0
- data/test/tmp/RackMultipart20100131-98521-1fdcemt-0 +0 -0
- data/test/tmp/RackMultipart20100131-98521-1l33j9z-0 +1 -0
- data/test/tmp/RackMultipart20100131-98521-1ohobk0-0 +0 -0
- data/test/tmp/RackMultipart20100131-98521-45jwmb-0 +1 -0
- data/test/tmp/RackMultipart20100131-98521-7vu49l-0 +1 -0
- data/test/tmp/RackMultipart20100131-98521-9kzlxx-0 +1 -0
- data/test/tmp/RackMultipart20100131-98521-cycfj-0 +0 -0
- data/test/tmp/RackMultipart20100131-98521-hhd1bf-0 +1 -0
- data/test/tmp/RackMultipart20100131-98521-iqvlrq-0 +0 -0
- data/test/tmp/RackMultipart20100201-6555-1ce2ok5-0 +1 -0
- data/test/tmp/RackMultipart20100201-6555-2rd8zm-0 +0 -0
- data/test/tmp/RackMultipart20100201-6555-9brifb-0 +0 -0
- data/test/tmp/RackMultipart20100201-6555-dcf8h0-0 +1 -0
- data/test/tmp/RackMultipart20100201-6555-meb4gi-0 +1 -0
- data/test/tmp/RackMultipart20100201-6555-sci6i5-0 +0 -0
- data/test/tmp/RackMultipart20100201-6555-sox363-0 +1 -0
- data/test/tmp/RackMultipart20100201-6555-x9kyyz-0 +0 -0
- data/test/tmp/RackMultipart20100201-6555-zqn4x6-0 +1 -0
- data/test/tmp/RackMultipart20100204-40252-123q4em-0 +1 -0
- data/test/tmp/RackMultipart20100204-40252-1jzjes5-0 +0 -0
- data/test/tmp/RackMultipart20100204-40252-1reve0y-0 +0 -0
- data/test/tmp/RackMultipart20100204-40252-1u2b3qm-0 +1 -0
- data/test/tmp/RackMultipart20100204-40252-3un54m-0 +1 -0
- data/test/tmp/RackMultipart20100204-40252-a2oh9b-0 +0 -0
- data/test/tmp/RackMultipart20100204-40252-od0run-0 +1 -0
- data/test/tmp/RackMultipart20100204-40252-qbgvnt-0 +0 -0
- data/test/tmp/RackMultipart20100204-40252-tey6cp-0 +1 -0
- data/test/tmp/RackMultipart20100204-40512-15nitzo-0 +0 -0
- data/test/tmp/RackMultipart20100204-40512-18g0pdd-0 +0 -0
- data/test/tmp/RackMultipart20100204-40512-1brd1j2-0 +1 -0
- data/test/tmp/RackMultipart20100204-40512-1fz7mb1-0 +0 -0
- data/test/tmp/RackMultipart20100204-40512-1n1muze-0 +1 -0
- data/test/tmp/RackMultipart20100204-40512-1q3r24f-0 +1 -0
- data/test/tmp/RackMultipart20100204-40512-1tnhl3y-0 +1 -0
- data/test/tmp/RackMultipart20100204-40512-okgtu4-0 +0 -0
- data/test/tmp/RackMultipart20100204-40512-qn5sg0-0 +1 -0
- data/test/tmp/RackMultipart20100204-57419-15yya1x-0 +1 -0
- data/test/tmp/RackMultipart20100204-57419-19m1c3d-0 +0 -0
- data/test/tmp/RackMultipart20100204-57419-1n7d3i6-0 +1 -0
- data/test/tmp/RackMultipart20100204-57419-1npqntd-0 +0 -0
- data/test/tmp/RackMultipart20100204-57419-bklpgc-0 +1 -0
- data/test/tmp/RackMultipart20100204-57419-ei91e5-0 +0 -0
- data/test/tmp/RackMultipart20100204-57419-g1hqwp-0 +1 -0
- data/test/tmp/RackMultipart20100204-57419-t7ag5k-0 +0 -0
- data/test/tmp/RackMultipart20100204-57419-xiebhk-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-16cfrux-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-19wbkan-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-1qptexw-0 +0 -0
- data/test/tmp/RackMultipart20100204-57658-1u2bpg8-0 +0 -0
- data/test/tmp/RackMultipart20100204-57658-1v8jrhq-0 +0 -0
- data/test/tmp/RackMultipart20100204-57658-48l4m0-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-hpw0o9-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-l75jof-0 +1 -0
- data/test/tmp/RackMultipart20100204-57658-t3or19-0 +0 -0
- data/test/tmp/RackMultipart20100204-57712-101mfz2-0 +1 -0
- data/test/tmp/RackMultipart20100204-57712-136zsqs-0 +0 -0
- data/test/tmp/RackMultipart20100204-57712-16ge0ra-0 +1 -0
- data/test/tmp/RackMultipart20100204-57712-18dppuc-0 +0 -0
- data/test/tmp/RackMultipart20100204-57712-1aj6ady-0 +0 -0
- data/test/tmp/RackMultipart20100204-57712-1nqkndh-0 +1 -0
- data/test/tmp/RackMultipart20100204-57712-1pngw5w-0 +1 -0
- data/test/tmp/RackMultipart20100204-57712-6lo90o-0 +1 -0
- data/test/tmp/RackMultipart20100204-57712-ufq7x-0 +0 -0
- data/test/tmp/RackMultipart20100204-58321-10lc3a6-0 +1 -0
- data/test/tmp/RackMultipart20100204-58321-15o8a4o-0 +0 -0
- data/test/tmp/RackMultipart20100204-58321-1sos76-0 +1 -0
- data/test/tmp/RackMultipart20100204-58321-26876u-0 +1 -0
- data/test/tmp/RackMultipart20100204-58321-hnz5b8-0 +0 -0
- data/test/tmp/RackMultipart20100204-58321-lrmvfa-0 +1 -0
- data/test/tmp/RackMultipart20100204-58321-q0ak2g-0 +1 -0
- data/test/tmp/RackMultipart20100204-58321-sa8wal-0 +0 -0
- data/test/tmp/RackMultipart20100204-58321-z7jxeq-0 +0 -0
- data/test/tmp/RackMultipart20100204-59702-1fdw43n-0 +1 -0
- data/test/tmp/RackMultipart20100204-59702-2hf4ld-0 +1 -0
- data/test/tmp/RackMultipart20100204-59702-2ldyxj-0 +0 -0
- data/test/tmp/RackMultipart20100204-59702-aqevfm-0 +1 -0
- data/test/tmp/RackMultipart20100204-59702-dpbv5t-0 +0 -0
- data/test/tmp/RackMultipart20100204-59702-ec8276-0 +1 -0
- data/test/tmp/RackMultipart20100204-59702-jn6ncc-0 +1 -0
- data/test/tmp/RackMultipart20100204-59702-m8xobr-0 +0 -0
- data/test/tmp/RackMultipart20100204-59702-q89plk-0 +0 -0
- data/test/tmp/RackMultipart20100204-59747-14sdb6-0 +1 -0
- data/test/tmp/RackMultipart20100204-59747-15742uk-0 +1 -0
- data/test/tmp/RackMultipart20100204-59747-15lp9kl-0 +0 -0
- data/test/tmp/RackMultipart20100204-59747-1a7ub6i-0 +0 -0
- data/test/tmp/RackMultipart20100204-59747-1i77fp1-0 +1 -0
- data/test/tmp/RackMultipart20100204-59747-1mfl7gf-0 +0 -0
- data/test/tmp/RackMultipart20100204-59747-1qrkt89-0 +0 -0
- data/test/tmp/RackMultipart20100204-59747-6biaui-0 +1 -0
- data/test/tmp/RackMultipart20100204-59747-m7iqd0-0 +1 -0
- data/test/tmp/RackMultipart20100204-60097-1kgjis5-0 +0 -0
- data/test/tmp/RackMultipart20100204-60097-1odv8os-0 +1 -0
- data/test/tmp/RackMultipart20100204-60097-1p5yvyk-0 +0 -0
- data/test/tmp/RackMultipart20100204-60097-43si9w-0 +1 -0
- data/test/tmp/RackMultipart20100204-60097-awjfar-0 +1 -0
- data/test/tmp/RackMultipart20100204-60097-d7g9gf-0 +1 -0
- data/test/tmp/RackMultipart20100204-60097-fmxwtb-0 +0 -0
- data/test/tmp/RackMultipart20100204-60097-i8r8ph-0 +0 -0
- data/test/tmp/RackMultipart20100204-60097-yv1urn-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-14k87gs-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-15uh5fc-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-1b4gi3-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-1g0sg6r-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-1jgjbwl-0 +0 -0
- data/test/tmp/RackMultipart20100204-60773-1kk50pp-0 +0 -0
- data/test/tmp/RackMultipart20100204-60773-1xktk0q-0 +0 -0
- data/test/tmp/RackMultipart20100204-60773-jcuq05-0 +1 -0
- data/test/tmp/RackMultipart20100204-60773-og04od-0 +0 -0
- data/test/tmp/RackMultipart20100205-69480-169yh4u-0 +1 -0
- data/test/tmp/RackMultipart20100205-69480-16ry3sk-0 +0 -0
- data/test/tmp/RackMultipart20100205-69480-1dm58eb-0 +1 -0
- data/test/tmp/RackMultipart20100205-69480-1e6dfel-0 +1 -0
- data/test/tmp/RackMultipart20100205-69480-1knio7h-0 +0 -0
- data/test/tmp/RackMultipart20100205-69480-1rxthf1-0 +1 -0
- data/test/tmp/RackMultipart20100205-69480-1sqp1p6-0 +1 -0
- data/test/tmp/RackMultipart20100205-69480-k3c5xi-0 +0 -0
- data/test/tmp/RackMultipart20100205-69480-y0o7bs-0 +0 -0
- data/test/tmp/RackMultipart20100205-89390-12t4t4h-0 +0 -0
- data/test/tmp/RackMultipart20100205-89390-18sku49-0 +1 -0
- data/test/tmp/RackMultipart20100205-89390-1aeaxrj-0 +0 -0
- data/test/tmp/RackMultipart20100205-89390-1ej1o6b-0 +0 -0
- data/test/tmp/RackMultipart20100205-89390-1qbye80-0 +1 -0
- data/test/tmp/RackMultipart20100205-89390-1t2reiw-0 +0 -0
- data/test/tmp/RackMultipart20100205-89390-2j4ebh-0 +1 -0
- data/test/tmp/RackMultipart20100205-89390-cqkz93-0 +1 -0
- data/test/tmp/RackMultipart20100205-89390-ehlxym-0 +1 -0
- data/test/tmp/RackMultipart20100207-41099-1db1yc7-0 +0 -0
- data/test/tmp/RackMultipart20100207-41099-1enfwih-0 +0 -0
- data/test/tmp/RackMultipart20100207-41099-1hiqogn-0 +1 -0
- data/test/tmp/RackMultipart20100207-41099-1n21xz7-0 +0 -0
- data/test/tmp/RackMultipart20100207-41099-1ofbaxj-0 +0 -0
- data/test/tmp/RackMultipart20100207-41099-1pqhw0q-0 +1 -0
- data/test/tmp/RackMultipart20100207-41099-1s6zxzw-0 +1 -0
- data/test/tmp/RackMultipart20100207-41099-asxuq9-0 +1 -0
- data/test/tmp/RackMultipart20100207-41099-eowd6o-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-10ag1jr-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-13zm3yu-0 +0 -0
- data/test/tmp/RackMultipart20100209-65426-1otg9r6-0 +0 -0
- data/test/tmp/RackMultipart20100209-65426-1rdz5v6-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-1usq2ff-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-1wxs8n7-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-4uffbj-0 +1 -0
- data/test/tmp/RackMultipart20100209-65426-a5hra7-0 +0 -0
- data/test/tmp/RackMultipart20100209-65426-ylpq1h-0 +0 -0
- data/test/tmp/RackMultipart20100209-65558-1bghj62-0 +0 -0
- data/test/tmp/RackMultipart20100209-65558-1fbovnp-0 +1 -0
- data/test/tmp/RackMultipart20100209-65558-1hfwl02-0 +1 -0
- data/test/tmp/RackMultipart20100209-65558-b35wyr-0 +0 -0
- data/test/tmp/RackMultipart20100209-65558-esd0f1-0 +1 -0
- data/test/tmp/RackMultipart20100209-65558-gq26ri-0 +0 -0
- data/test/tmp/RackMultipart20100209-65558-mwizdx-0 +1 -0
- data/test/tmp/RackMultipart20100209-65558-ntlzq6-0 +1 -0
- data/test/tmp/RackMultipart20100209-65558-yoxcgc-0 +0 -0
- data/test/tmp/RackMultipart20100212-43647-12bo3g0-0 +0 -0
- data/test/tmp/RackMultipart20100212-43647-133b4b8-0 +1 -0
- data/test/tmp/RackMultipart20100212-43647-1b2g7f7-0 +1 -0
- data/test/tmp/RackMultipart20100212-43647-1et2ima-0 +0 -0
- data/test/tmp/RackMultipart20100212-43647-1thip8b-0 +1 -0
- data/test/tmp/RackMultipart20100212-43647-1x05hpf-0 +1 -0
- data/test/tmp/RackMultipart20100212-43647-cbseb3-0 +0 -0
- data/test/tmp/RackMultipart20100212-43647-mybv0k-0 +1 -0
- data/test/tmp/RackMultipart20100212-43647-scxg3k-0 +0 -0
- data/test/tmp/RackMultipart20100316-26215-15fvlkf-0 +1 -0
- data/test/tmp/RackMultipart20100316-26215-15ms9t8-0 +0 -0
- data/test/tmp/RackMultipart20100316-26215-196k138-0 +0 -0
- data/test/tmp/RackMultipart20100316-26215-1qbnikd-0 +1 -0
- data/test/tmp/RackMultipart20100316-26215-1tey31-0 +1 -0
- data/test/tmp/RackMultipart20100316-26215-dp0rwx-0 +0 -0
- data/test/tmp/RackMultipart20100316-26215-lmfp1-0 +1 -0
- data/test/tmp/RackMultipart20100316-26215-njsjmn-0 +0 -0
- data/test/tmp/RackMultipart20100316-26215-z39dzf-0 +1 -0
- data/test/tmp/mona_lisa.jpg20100114-2850-1t73ev7-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100127-16318-1bffb05-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-1041-1rvua2k-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-1200-i3rods-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-1566-18mcqh9-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-2176-1t3bsp-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-2251-1tz4wqa-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-2563-ohvnnb-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-3076-m9pk9y-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-3324-9rpzdj-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-3712-wf4b9m-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4098-l9cg9j-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4178-vk5vzl-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4297-ger5pb-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4434-1bacf3n-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4544-1mod9m0-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-4655-14v218s-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-5244-j05927-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-5383-immke7-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-5711-li3y72-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-91110-1tcf6h5-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-91876-1qvpsdp-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-93665-e6omtk-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-96270-l86z07-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-96373-du21ld-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-96488-14o5536-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-96889-1gtncmi-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-97178-1ppkuxt-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-97404-kcrmpr-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-97860-q1g3ex-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-97900-1mp4tmq-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-97937-o67sr4-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100131-98521-jd7yia-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100201-6555-1vw40l7-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-40252-13zlhuo-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-40512-nc3x8n-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-57419-7yfe6o-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-57658-b4op4h-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-57712-11uqh50-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-58321-ukp8q0-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-59747-ov4w4c-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-60097-1ekqjc6-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100204-60773-1eh6ap6-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100205-69480-tay2k2-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100205-89390-16rh2ue-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100205-91358-cdsa2g-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100207-41099-llyyhb-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100209-65426-pequnv-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100209-65558-fbl6xv-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100212-43647-l1vsxc-0 +0 -0
- data/test/tmp/mona_lisa.jpg20100316-26215-1jtjllg-0 +0 -0
- metadata +542 -18
- data/lib/action_view/erb/util.rb +0 -44
- data/lib/action_view/safe_buffer.rb +0 -28
- data/test/view/safe_buffer_test.rb +0 -36
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Rack 1.0 does not allow string subclass body. This does not play well with our
|
|
1
|
+
# Rack 1.0 does not allow string subclass body. This does not play well with our ActiveSupport::SafeBuffer.
|
|
2
2
|
# The next release of Rack will be allowing string subclass body - http://github.com/rack/rack/commit/de668df02802a0335376a81ba709270e43ba9d55
|
|
3
3
|
# TODO : Remove this monkey patch after the next release of Rack
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ module ActionController #:nodoc:
|
|
|
15
15
|
# behavior is achieved by overriding the <tt>rescue_action_in_public</tt>
|
|
16
16
|
# and <tt>rescue_action_locally</tt> methods.
|
|
17
17
|
module Rescue
|
|
18
|
-
LOCALHOST = '127.0.0.1'.freeze
|
|
18
|
+
LOCALHOST = ['127.0.0.1', '::1'].freeze
|
|
19
19
|
|
|
20
20
|
DEFAULT_RESCUE_RESPONSE = :internal_server_error
|
|
21
21
|
DEFAULT_RESCUE_RESPONSES = {
|
|
@@ -122,7 +122,7 @@ module ActionController #:nodoc:
|
|
|
122
122
|
# method if you wish to redefine the meaning of a local request to
|
|
123
123
|
# include remote IP addresses or other criteria.
|
|
124
124
|
def local_request? #:doc:
|
|
125
|
-
request.remote_addr ==
|
|
125
|
+
LOCALHOST.any?{ |local_ip| request.remote_addr == local_ip && request.remote_ip == local_ip }
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
# Render detailed diagnostics for unhandled exceptions rescued from
|
|
@@ -117,11 +117,7 @@ module ActionController # :nodoc:
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
def etag=(etag)
|
|
120
|
-
|
|
121
|
-
headers.delete('ETag')
|
|
122
|
-
else
|
|
123
|
-
headers['ETag'] = %("#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}")
|
|
124
|
-
end
|
|
120
|
+
headers['ETag'] = %("#{Digest::MD5.hexdigest(ActiveSupport::Cache.expand_cache_key(etag))}")
|
|
125
121
|
end
|
|
126
122
|
|
|
127
123
|
def redirect(url, status)
|
|
@@ -202,7 +198,7 @@ module ActionController # :nodoc:
|
|
|
202
198
|
|
|
203
199
|
def nonempty_ok_response?
|
|
204
200
|
ok = !status || status.to_s[0..2] == '200'
|
|
205
|
-
ok && body.is_a?(String) && !body.
|
|
201
|
+
ok && body.is_a?(String) && !body.blank?
|
|
206
202
|
end
|
|
207
203
|
|
|
208
204
|
def set_conditional_cache_control!
|
|
@@ -233,7 +229,8 @@ module ActionController # :nodoc:
|
|
|
233
229
|
end
|
|
234
230
|
|
|
235
231
|
def convert_cookies!
|
|
236
|
-
|
|
232
|
+
cookies = Array(headers['Set-Cookie']).compact
|
|
233
|
+
headers['Set-Cookie'] = cookies unless cookies.empty?
|
|
237
234
|
end
|
|
238
235
|
end
|
|
239
236
|
end
|
|
@@ -174,6 +174,7 @@ module ActionController
|
|
|
174
174
|
#
|
|
175
175
|
named_helper_module_eval <<-end_eval # We use module_eval to avoid leaks
|
|
176
176
|
def #{selector}(*args) # def users_url(*args)
|
|
177
|
+
args.compact! #
|
|
177
178
|
#
|
|
178
179
|
#{generate_optimisation_block(route, kind)} # #{generate_optimisation_block(route, kind)}
|
|
179
180
|
#
|
|
@@ -98,12 +98,18 @@ module ActionController
|
|
|
98
98
|
# Process legacy CGI options
|
|
99
99
|
options = options.symbolize_keys
|
|
100
100
|
if options.has_key?(:session_path)
|
|
101
|
+
ActiveSupport::Deprecation.warn "Giving :session_path to SessionStore is deprecated, " <<
|
|
102
|
+
"please use :path instead", caller
|
|
101
103
|
options[:path] = options.delete(:session_path)
|
|
102
104
|
end
|
|
103
105
|
if options.has_key?(:session_key)
|
|
106
|
+
ActiveSupport::Deprecation.warn "Giving :session_key to SessionStore is deprecated, " <<
|
|
107
|
+
"please use :key instead", caller
|
|
104
108
|
options[:key] = options.delete(:session_key)
|
|
105
109
|
end
|
|
106
110
|
if options.has_key?(:session_http_only)
|
|
111
|
+
ActiveSupport::Deprecation.warn "Giving :session_http_only to SessionStore is deprecated, " <<
|
|
112
|
+
"please use :httponly instead", caller
|
|
107
113
|
options[:httponly] = options.delete(:session_http_only)
|
|
108
114
|
end
|
|
109
115
|
|
|
@@ -59,12 +59,18 @@ module ActionController
|
|
|
59
59
|
# Process legacy CGI options
|
|
60
60
|
options = options.symbolize_keys
|
|
61
61
|
if options.has_key?(:session_path)
|
|
62
|
+
ActiveSupport::Deprecation.warn "Giving :session_path to SessionStore is deprecated, " <<
|
|
63
|
+
"please use :path instead", caller
|
|
62
64
|
options[:path] = options.delete(:session_path)
|
|
63
65
|
end
|
|
64
66
|
if options.has_key?(:session_key)
|
|
67
|
+
ActiveSupport::Deprecation.warn "Giving :session_key to SessionStore is deprecated, " <<
|
|
68
|
+
"please use :key instead", caller
|
|
65
69
|
options[:key] = options.delete(:session_key)
|
|
66
70
|
end
|
|
67
71
|
if options.has_key?(:session_http_only)
|
|
72
|
+
ActiveSupport::Deprecation.warn "Giving :session_http_only to SessionStore is deprecated, " <<
|
|
73
|
+
"please use :httponly instead", caller
|
|
68
74
|
options[:httponly] = options.delete(:session_http_only)
|
|
69
75
|
end
|
|
70
76
|
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';"
|
|
16
16
|
hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"}
|
|
17
17
|
%>
|
|
18
|
-
<a href="#" onclick="<%= hide %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %>
|
|
18
|
+
<a href="#" onclick="<%= hide.join %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %>
|
|
19
19
|
<% end %>
|
|
20
20
|
|
|
21
21
|
<% traces.each do |name, trace| %>
|
|
22
22
|
<div id="<%= name.gsub /\s/, '-' %>" style="display: <%= name == "Application Trace" ? 'block' : 'none' %>;">
|
|
23
|
-
<pre><code><%= trace.join "\n" %></code></pre>
|
|
23
|
+
<pre><code><%=h trace.join "\n" %></code></pre>
|
|
24
24
|
</div>
|
|
25
25
|
<% end %>
|
|
26
26
|
</div>
|
|
@@ -159,6 +159,9 @@ module ActionController
|
|
|
159
159
|
end
|
|
160
160
|
|
|
161
161
|
def rewrite(options = {})
|
|
162
|
+
if options.include?(:overwrite_params)
|
|
163
|
+
ActiveSupport::Deprecation.warn 'The :overwrite_params option is deprecated. Specify all the necessary parameters instead', caller
|
|
164
|
+
end
|
|
162
165
|
rewrite_url(options)
|
|
163
166
|
end
|
|
164
167
|
|
|
@@ -194,7 +197,7 @@ module ActionController
|
|
|
194
197
|
options = options.symbolize_keys
|
|
195
198
|
options.update(options[:params].symbolize_keys) if options[:params]
|
|
196
199
|
|
|
197
|
-
if
|
|
200
|
+
if overwrite = options.delete(:overwrite_params)
|
|
198
201
|
options.update(@parameters.symbolize_keys)
|
|
199
202
|
options.update(overwrite.symbolize_keys)
|
|
200
203
|
end
|
data/lib/action_pack.rb
CHANGED
data/lib/action_pack/version.rb
CHANGED
data/lib/action_view.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#--
|
|
2
|
-
# Copyright (c) 2004-
|
|
2
|
+
# Copyright (c) 2004-2010 David Heinemeier Hansson
|
|
3
3
|
#
|
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining
|
|
5
5
|
# a copy of this software and associated documentation files (the
|
|
@@ -49,10 +49,10 @@ module ActionView
|
|
|
49
49
|
autoload :TemplateHandler, 'action_view/template_handler'
|
|
50
50
|
autoload :TemplateHandlers, 'action_view/template_handlers'
|
|
51
51
|
autoload :Helpers, 'action_view/helpers'
|
|
52
|
-
autoload :SafeBuffer, 'action_view/safe_buffer'
|
|
53
52
|
end
|
|
54
53
|
|
|
55
|
-
require '
|
|
54
|
+
require 'active_support/core_ext/string/output_safety'
|
|
56
55
|
|
|
56
|
+
ActionView::SafeBuffer = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActionView::SafeBuffer', 'ActiveSupport::SafeBuffer')
|
|
57
57
|
|
|
58
58
|
I18n.load_path << "#{File.dirname(__FILE__)}/action_view/locale/en.yml"
|
|
@@ -3,7 +3,7 @@ require 'action_view/helpers/form_helper'
|
|
|
3
3
|
|
|
4
4
|
module ActionView
|
|
5
5
|
class Base
|
|
6
|
-
@@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"fieldWithErrors\">#{html_tag}</div>".html_safe
|
|
6
|
+
@@field_error_proc = Proc.new{ |html_tag, instance| "<div class=\"fieldWithErrors\">#{html_tag}</div>".html_safe }
|
|
7
7
|
cattr_accessor :field_error_proc
|
|
8
8
|
end
|
|
9
9
|
|
|
@@ -82,11 +82,11 @@ module ActionView
|
|
|
82
82
|
submit_value = options[:submit_value] || options[:action].gsub(/[^\w]/, '').capitalize
|
|
83
83
|
|
|
84
84
|
contents = form_tag({:action => action}, :method =>(options[:method] || 'post'), :enctype => options[:multipart] ? 'multipart/form-data': nil)
|
|
85
|
-
contents
|
|
86
|
-
contents
|
|
85
|
+
contents.safe_concat hidden_field(record_name, :id) unless record.new_record?
|
|
86
|
+
contents.safe_concat all_input_tags(record, record_name, options)
|
|
87
87
|
yield contents if block_given?
|
|
88
|
-
contents
|
|
89
|
-
contents
|
|
88
|
+
contents.safe_concat submit_tag(submit_value)
|
|
89
|
+
contents.safe_concat '</form>'
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
# Returns a string containing the error message attached to the +method+ on the +object+ if one exists.
|
|
@@ -121,7 +121,7 @@ module ActionView
|
|
|
121
121
|
if (obj = (object.respond_to?(:errors) ? object : instance_variable_get("@#{object}"))) &&
|
|
122
122
|
(errors = obj.errors.on(method))
|
|
123
123
|
content_tag("div",
|
|
124
|
-
"#{options[:prepend_text]}#{ERB::Util.html_escape(errors.is_a?(Array) ? errors.first : errors)}#{options[:append_text]}",
|
|
124
|
+
"#{options[:prepend_text]}#{ERB::Util.html_escape(errors.is_a?(Array) ? errors.first : errors)}#{options[:append_text]}".html_safe,
|
|
125
125
|
:class => options[:css_class]
|
|
126
126
|
)
|
|
127
127
|
else
|
|
@@ -193,19 +193,19 @@ module ActionView
|
|
|
193
193
|
header_message = if options.include?(:header_message)
|
|
194
194
|
options[:header_message]
|
|
195
195
|
else
|
|
196
|
-
object_name = options[:object_name].to_s
|
|
197
|
-
object_name = I18n.t(object_name, :default => object_name, :scope => [:activerecord, :models], :count => 1)
|
|
196
|
+
object_name = options[:object_name].to_s
|
|
197
|
+
object_name = I18n.t(object_name, :default => object_name.gsub('_', ' '), :scope => [:activerecord, :models], :count => 1)
|
|
198
198
|
locale.t :header, :count => count, :model => object_name
|
|
199
199
|
end
|
|
200
200
|
message = options.include?(:message) ? options[:message] : locale.t(:body)
|
|
201
|
-
error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, ERB::Util.html_escape(msg)) } }.join
|
|
201
|
+
error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, ERB::Util.html_escape(msg)) } }.join.html_safe
|
|
202
202
|
|
|
203
203
|
contents = ''
|
|
204
204
|
contents << content_tag(options[:header_tag] || :h2, header_message) unless header_message.blank?
|
|
205
205
|
contents << content_tag(:p, message) unless message.blank?
|
|
206
206
|
contents << content_tag(:ul, error_messages)
|
|
207
207
|
|
|
208
|
-
content_tag(:div, contents, html)
|
|
208
|
+
content_tag(:div, contents.html_safe, html)
|
|
209
209
|
end
|
|
210
210
|
else
|
|
211
211
|
''
|
|
@@ -290,7 +290,7 @@ module ActionView
|
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
def error_wrapping(html_tag, has_error)
|
|
293
|
-
has_error ? Base.field_error_proc.call(html_tag, self)
|
|
293
|
+
has_error ? Base.field_error_proc.call(html_tag, self) : html_tag
|
|
294
294
|
end
|
|
295
295
|
|
|
296
296
|
def error_message
|
|
@@ -285,7 +285,7 @@ module ActionView
|
|
|
285
285
|
end
|
|
286
286
|
javascript_src_tag(joined_javascript_name, options)
|
|
287
287
|
else
|
|
288
|
-
expand_javascript_sources(sources, recursive).collect { |source| javascript_src_tag(source, options) }.join("\n").html_safe
|
|
288
|
+
expand_javascript_sources(sources, recursive).collect { |source| javascript_src_tag(source, options) }.join("\n").html_safe
|
|
289
289
|
end
|
|
290
290
|
end
|
|
291
291
|
|
|
@@ -434,7 +434,7 @@ module ActionView
|
|
|
434
434
|
end
|
|
435
435
|
stylesheet_tag(joined_stylesheet_name, options)
|
|
436
436
|
else
|
|
437
|
-
expand_stylesheet_sources(sources, recursive).collect { |source| stylesheet_tag(source, options) }.join("\n").html_safe
|
|
437
|
+
expand_stylesheet_sources(sources, recursive).collect { |source| stylesheet_tag(source, options) }.join("\n").html_safe
|
|
438
438
|
end
|
|
439
439
|
end
|
|
440
440
|
|
|
@@ -118,13 +118,13 @@ module ActionView
|
|
|
118
118
|
def content_for(name, content = nil, &block)
|
|
119
119
|
ivar = "@content_for_#{name}"
|
|
120
120
|
content = capture(&block) if block_given?
|
|
121
|
-
instance_variable_set(ivar, "#{instance_variable_get(ivar)}#{content}".html_safe
|
|
121
|
+
instance_variable_set(ivar, "#{instance_variable_get(ivar)}#{content}".html_safe)
|
|
122
122
|
nil
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
# Use an alternate output buffer for the duration of the block.
|
|
126
126
|
# Defaults to a new empty string.
|
|
127
|
-
def with_output_buffer(buf =
|
|
127
|
+
def with_output_buffer(buf = ActiveSupport::SafeBuffer.new) #:nodoc:
|
|
128
128
|
self.output_buffer, old_buffer = buf, output_buffer
|
|
129
129
|
yield
|
|
130
130
|
output_buffer
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require "date"
|
|
2
2
|
require 'action_view/helpers/tag_helper'
|
|
3
|
+
require 'active_support/core_ext/hash/slice'
|
|
3
4
|
|
|
4
5
|
module ActionView
|
|
5
6
|
module Helpers
|
|
@@ -616,7 +617,7 @@ module ActionView
|
|
|
616
617
|
|
|
617
618
|
build_selects_from_types(order)
|
|
618
619
|
else
|
|
619
|
-
"#{select_date}#{@options[:datetime_separator]}#{select_time}"
|
|
620
|
+
"#{select_date}#{@options[:datetime_separator]}#{select_time}".html_safe
|
|
620
621
|
end
|
|
621
622
|
end
|
|
622
623
|
|
|
@@ -815,7 +816,7 @@ module ActionView
|
|
|
815
816
|
tag_options[:selected] = "selected" if selected == i
|
|
816
817
|
select_options << content_tag(:option, value, tag_options)
|
|
817
818
|
end
|
|
818
|
-
select_options.join("\n") + "\n"
|
|
819
|
+
(select_options.join("\n") + "\n").html_safe
|
|
819
820
|
end
|
|
820
821
|
|
|
821
822
|
# Builds select tag from date type and html select options
|
|
@@ -833,9 +834,9 @@ module ActionView
|
|
|
833
834
|
select_html = "\n"
|
|
834
835
|
select_html << content_tag(:option, '', :value => '') + "\n" if @options[:include_blank]
|
|
835
836
|
select_html << prompt_option_tag(type, @options[:prompt]) + "\n" if @options[:prompt]
|
|
836
|
-
select_html << select_options_as_html
|
|
837
|
+
select_html << select_options_as_html
|
|
837
838
|
|
|
838
|
-
content_tag(:select, select_html, select_options) + "\n"
|
|
839
|
+
(content_tag(:select, select_html.html_safe, select_options) + "\n").html_safe
|
|
839
840
|
end
|
|
840
841
|
|
|
841
842
|
# Builds a prompt option tag with supplied options or from default options
|
|
@@ -860,12 +861,12 @@ module ActionView
|
|
|
860
861
|
# build_hidden(:year, 2008)
|
|
861
862
|
# => "<input id="post_written_on_1i" name="post[written_on(1i)]" type="hidden" value="2008" />"
|
|
862
863
|
def build_hidden(type, value)
|
|
863
|
-
tag(:input, {
|
|
864
|
+
(tag(:input, {
|
|
864
865
|
:type => "hidden",
|
|
865
866
|
:id => input_id_from_type(type),
|
|
866
867
|
:name => input_name_from_type(type),
|
|
867
868
|
:value => value
|
|
868
|
-
}) + "\n"
|
|
869
|
+
}.merge(@html_options.slice(:disabled))) + "\n").html_safe
|
|
869
870
|
end
|
|
870
871
|
|
|
871
872
|
# Returns the name attribute for the input tag
|
|
@@ -896,7 +897,7 @@ module ActionView
|
|
|
896
897
|
separator = separator(type) unless type == order.first # don't add on last field
|
|
897
898
|
select.insert(0, separator.to_s + send("select_#{type}").to_s)
|
|
898
899
|
end
|
|
899
|
-
select
|
|
900
|
+
select.html_safe
|
|
900
901
|
end
|
|
901
902
|
|
|
902
903
|
# Returns the separator for a given datetime component
|
|
@@ -907,7 +908,7 @@ module ActionView
|
|
|
907
908
|
when :hour
|
|
908
909
|
(@options[:discard_year] && @options[:discard_day]) ? "" : @options[:datetime_separator]
|
|
909
910
|
when :minute
|
|
910
|
-
@options[:time_separator]
|
|
911
|
+
@options[:discard_minute] ? "" : @options[:time_separator]
|
|
911
912
|
when :second
|
|
912
913
|
@options[:include_seconds] ? @options[:time_separator] : ""
|
|
913
914
|
end
|
|
@@ -916,15 +917,15 @@ module ActionView
|
|
|
916
917
|
|
|
917
918
|
class InstanceTag #:nodoc:
|
|
918
919
|
def to_date_select_tag(options = {}, html_options = {})
|
|
919
|
-
datetime_selector(options, html_options).select_date.html_safe
|
|
920
|
+
datetime_selector(options, html_options).select_date.html_safe
|
|
920
921
|
end
|
|
921
922
|
|
|
922
923
|
def to_time_select_tag(options = {}, html_options = {})
|
|
923
|
-
datetime_selector(options, html_options).select_time.html_safe
|
|
924
|
+
datetime_selector(options, html_options).select_time.html_safe
|
|
924
925
|
end
|
|
925
926
|
|
|
926
927
|
def to_datetime_select_tag(options = {}, html_options = {})
|
|
927
|
-
datetime_selector(options, html_options).select_datetime.html_safe
|
|
928
|
+
datetime_selector(options, html_options).select_datetime.html_safe
|
|
928
929
|
end
|
|
929
930
|
|
|
930
931
|
private
|
|
@@ -27,10 +27,10 @@ module ActionView
|
|
|
27
27
|
def debug(object)
|
|
28
28
|
begin
|
|
29
29
|
Marshal::dump(object)
|
|
30
|
-
"<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", " ")}</pre>"
|
|
30
|
+
"<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", " ")}</pre>".html_safe
|
|
31
31
|
rescue Exception => e # errors from Marshal or YAML
|
|
32
32
|
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
|
|
33
|
-
"<code class='debug_dump'>#{h(object.inspect)}</code>"
|
|
33
|
+
"<code class='debug_dump'>#{h(object.inspect)}</code>".html_safe
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -280,7 +280,7 @@ module ActionView
|
|
|
280
280
|
|
|
281
281
|
concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {}))
|
|
282
282
|
fields_for(object_name, *(args << options), &proc)
|
|
283
|
-
concat('</form>'
|
|
283
|
+
concat('</form>')
|
|
284
284
|
end
|
|
285
285
|
|
|
286
286
|
def apply_form_for_options!(object_or_array, options) #:nodoc:
|
|
@@ -391,7 +391,7 @@ module ActionView
|
|
|
391
391
|
# accepts_nested_attributes_for :address, :allow_destroy => true
|
|
392
392
|
# end
|
|
393
393
|
#
|
|
394
|
-
# Now, when you use a form element with the <tt>
|
|
394
|
+
# Now, when you use a form element with the <tt>_destroy</tt> parameter,
|
|
395
395
|
# with a value that evaluates to +true+, you will destroy the associated
|
|
396
396
|
# model (eg. 1, '1', true, or 'true'):
|
|
397
397
|
#
|
|
@@ -399,7 +399,7 @@ module ActionView
|
|
|
399
399
|
# ...
|
|
400
400
|
# <% person_form.fields_for :address do |address_fields| %>
|
|
401
401
|
# ...
|
|
402
|
-
# Delete: <%= address_fields.check_box :
|
|
402
|
+
# Delete: <%= address_fields.check_box :_destroy %>
|
|
403
403
|
# <% end %>
|
|
404
404
|
# <% end %>
|
|
405
405
|
#
|
|
@@ -472,14 +472,14 @@ module ActionView
|
|
|
472
472
|
# end
|
|
473
473
|
#
|
|
474
474
|
# This will allow you to specify which models to destroy in the
|
|
475
|
-
# attributes hash by adding a form element for the <tt>
|
|
475
|
+
# attributes hash by adding a form element for the <tt>_destroy</tt>
|
|
476
476
|
# parameter with a value that evaluates to +true+
|
|
477
477
|
# (eg. 1, '1', true, or 'true'):
|
|
478
478
|
#
|
|
479
479
|
# <% form_for @person, :url => { :action => "update" } do |person_form| %>
|
|
480
480
|
# ...
|
|
481
481
|
# <% person_form.fields_for :projects do |project_fields| %>
|
|
482
|
-
# Delete: <%= project_fields.check_box :
|
|
482
|
+
# Delete: <%= project_fields.check_box :_destroy %>
|
|
483
483
|
# <% end %>
|
|
484
484
|
# <% end %>
|
|
485
485
|
def fields_for(record_or_name_or_array, *args, &block)
|
|
@@ -500,8 +500,9 @@ module ActionView
|
|
|
500
500
|
end
|
|
501
501
|
|
|
502
502
|
# Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object
|
|
503
|
-
# assigned to the template (identified by +object+). The text of label will default to the attribute name unless
|
|
504
|
-
#
|
|
503
|
+
# assigned to the template (identified by +object+). The text of label will default to the attribute name unless a translation
|
|
504
|
+
# is found in the current I18n locale (through views.labels.<modelname>.<attribute>) or you specify it explicitly.
|
|
505
|
+
# Additional options on the label tag can be passed as a hash with +options+. These options will be tagged
|
|
505
506
|
# onto the HTML as an HTML element attribute as in the example shown, except for the <tt>:value</tt> option, which is designed to
|
|
506
507
|
# target labels for radio_button tags (where the value is used in the ID of the input tag).
|
|
507
508
|
#
|
|
@@ -509,6 +510,29 @@ module ActionView
|
|
|
509
510
|
# label(:post, :title)
|
|
510
511
|
# # => <label for="post_title">Title</label>
|
|
511
512
|
#
|
|
513
|
+
# You can localize your labels based on model and attribute names.
|
|
514
|
+
# For example you can define the following in your locale (e.g. en.yml)
|
|
515
|
+
#
|
|
516
|
+
# views:
|
|
517
|
+
# labels:
|
|
518
|
+
# post:
|
|
519
|
+
# body: "Write your entire text here"
|
|
520
|
+
#
|
|
521
|
+
# Which then will result in
|
|
522
|
+
#
|
|
523
|
+
# label(:post, :body)
|
|
524
|
+
# # => <label for="post_body">Write your entire text here</label>
|
|
525
|
+
#
|
|
526
|
+
# Localization can also be based purely on the translation of the attribute-name like this:
|
|
527
|
+
#
|
|
528
|
+
# activerecord:
|
|
529
|
+
# attribute:
|
|
530
|
+
# post:
|
|
531
|
+
# cost: "Total cost"
|
|
532
|
+
#
|
|
533
|
+
# label(:post, :cost)
|
|
534
|
+
# # => <label for="post_cost">Total cost</label>
|
|
535
|
+
#
|
|
512
536
|
# label(:post, :title, "A short title")
|
|
513
537
|
# # => <label for="post_title">A short title</label>
|
|
514
538
|
#
|
|
@@ -739,7 +763,20 @@ module ActionView
|
|
|
739
763
|
add_default_name_and_id_for_value(tag_value, name_and_id)
|
|
740
764
|
options.delete("index")
|
|
741
765
|
options["for"] ||= name_and_id["id"]
|
|
742
|
-
|
|
766
|
+
|
|
767
|
+
content = if text.blank?
|
|
768
|
+
i18n_label = I18n.t("helpers.label.#{object_name}.#{method_name}", :default => "")
|
|
769
|
+
i18n_label if i18n_label.present?
|
|
770
|
+
else
|
|
771
|
+
text.to_s
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
content ||= if object && object.class.respond_to?(:human_attribute_name)
|
|
775
|
+
object.class.human_attribute_name(method_name)
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
content ||= method_name.humanize
|
|
779
|
+
|
|
743
780
|
label_tag(name_and_id["id"], content, options)
|
|
744
781
|
end
|
|
745
782
|
|
|
@@ -797,7 +834,7 @@ module ActionView
|
|
|
797
834
|
add_default_name_and_id(options)
|
|
798
835
|
hidden = tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value)
|
|
799
836
|
checkbox = tag("input", options)
|
|
800
|
-
(hidden + checkbox).html_safe
|
|
837
|
+
(hidden + checkbox).html_safe
|
|
801
838
|
end
|
|
802
839
|
|
|
803
840
|
def to_boolean_select_tag(options = {})
|
|
@@ -940,7 +977,7 @@ module ActionView
|
|
|
940
977
|
end
|
|
941
978
|
|
|
942
979
|
(field_helpers - %w(label check_box radio_button fields_for hidden_field)).each do |selector|
|
|
943
|
-
src = <<-end_src
|
|
980
|
+
src, line = <<-end_src, __LINE__ + 1
|
|
944
981
|
def #{selector}(method, options = {}) # def text_field(method, options = {})
|
|
945
982
|
@template.send( # @template.send(
|
|
946
983
|
#{selector.inspect}, # "text_field",
|
|
@@ -949,7 +986,7 @@ module ActionView
|
|
|
949
986
|
objectify_options(options)) # objectify_options(options))
|
|
950
987
|
end # end
|
|
951
988
|
end_src
|
|
952
|
-
class_eval src, __FILE__,
|
|
989
|
+
class_eval src, __FILE__, line
|
|
953
990
|
end
|
|
954
991
|
|
|
955
992
|
def fields_for(record_or_name_or_array, *args, &block)
|
|
@@ -1005,7 +1042,7 @@ module ActionView
|
|
|
1005
1042
|
end
|
|
1006
1043
|
|
|
1007
1044
|
def error_message_on(method, *args)
|
|
1008
|
-
@template.error_message_on(@object, method, *args)
|
|
1045
|
+
@template.error_message_on(@object || @object_name, method, *args)
|
|
1009
1046
|
end
|
|
1010
1047
|
|
|
1011
1048
|
def error_messages(options = {})
|