aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master-sec'Aaron Patterson2013-03-181-0/+15
|\ | | | | | | | | | | | | | | * master-sec: fix protocol checking in sanitization [CVE-2013-1857] JDOM XXE Protection [CVE-2013-1856] fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855] stop calling to_sym when building arel nodes [CVE-2013-1854]
| * fix protocol checking in sanitization [CVE-2013-1857]Aaron Patterson2013-03-151-0/+10
| |
| * fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855]Charlie Somerville2013-03-151-0/+5
| |
* | remove ancient TODOs [ci skip].Yves Senn2013-03-181-1/+0
| |
* | Allow pass multipart option to form_forGrzegorz Derebecki2013-03-171-2/+2
| |
* | Fix incorrectly appended square brackets to a multiple select boxOlek Janiszewski2013-03-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If an explicit name has been given and it already ends with "[]" Before: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][][]" ...> After: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][]" ...>
* | Add missing require to debug helper testCarlos Antonio da Silva2013-03-051-2/+2
| |
* | Add DebugHelperTestrobertomiranda2013-03-051-0/+8
|/
* Merge pull request #9366 from killthekitten/fix-content_for-regressionRafael Mendonça França2013-02-281-0/+4
|\ | | | | Fix for #9360 content_for regression
| * Fix #9360 regression in content_forNikolay Shebanov2013-02-251-0/+4
| |
* | cleanup AP number_helpers_testYves Senn2013-02-271-47/+47
| | | | | | | | | | | | * use 1.9 style hash syntax * don't use brances on assert_equal * prefere " over '
* | remove duplicated number_helper tests in AP. They are already in AS.Yves Senn2013-02-271-270/+22
| | | | | | | | | | | | | | | | With 155cd5e6 the number_helpers were moved into AS all the tests were copied over but the tests in AP were not deleted. This is confusing. I removed all duplicated tests and reorganized the tests in AP to only test the functionality, that is added in AP.
* | Merge pull request #8530 from dasch/dependency-trackersDavid Heinemeier Hansson2013-02-252-1/+48
|\ \ | | | | | | Custom dependency trackers for the template digestor
| * | Register trackers on extensions, not handlersDaniel Schierbeck2013-02-202-5/+6
| | |
| * | Return an empty array if no tracker is foundDaniel Schierbeck2013-02-201-2/+9
| | |
| * | Allow registering custom dependency trackersDaniel Schierbeck2013-02-202-1/+40
| | |
* | | Move number_to_human test from AP to ASCarlos Antonio da Silva2013-02-221-5/+0
| | | | | | | | | | | | | | | Since all changes from #9347 are related to AS, it seems proper that the test is placed there as well.
* | | Address edge case for number_to_human with units option.hoffm2013-02-221-0/+5
| | | | | | | | | | | | | | | | | | ActiveSupport::NumberHelper#number_to_human now returns the number unaltered when the units hash does not contain the needed key, e.g. when the number provided is less than the largest key provided.
* | | Merge pull request #9334 from NARKOZ/time_tagAndrew White2013-02-211-18/+18
|\ \ \ | | | | | | | | use ISO 8601 format in time_tag helper
| * | | fix time_tag helper and update tests to not rely on dynamically generated valuesNihad Abbasov2013-02-221-18/+18
| |/ / | | | | | | | | | | | | | | | | | | Before `time_tag Date.today` will return `<time datetime="2013-02-14T00:00:00+00:00">February 14, 2013</time>`. This commit fixes time_tag helper to use RFC-3339 full-date format (Y-m-d) in datetime attribute.
* | / Revert "Revert "Merge pull request #4803 from lucascaton/master""Santiago Pastorino2013-02-211-1/+1
| |/ |/| | | | | This reverts commit 6871bd9818a9a7d9d8c7e21e253d64c0410fde1d.
* | Use #grep to filter priority zones when a regexp is givenCarlos Antonio da Silva2013-02-211-2/+4
| |
* | Fix test name and refactor fake timezones creation in form options testCarlos Antonio da Silva2013-02-211-3/+3
| |
* | remove assigned but unused variable warningNihad Abbasov2013-02-211-2/+2
| |
* | Revert "Merge pull request #4803 from lucascaton/master"Santiago Pastorino2013-02-201-1/+1
|/ | | | | | | | | | | | | | | This reverts commit bb842e8d2111e50b21a14b8bd6d89371a4b9cd68, reversing changes made to 40c287c7983c20c498f6a8a2ea49e9a6455347f7. This was causing issues in one of our apps we just upgraded. ActionController::RoutingError: No route matches [GET] "/images/favicon.ico" favicon_link_tag now returns '/images/favicon.ico' and in 3.2 returned '/favicon.ico' Browsers by default look for favicon.ico in the root directory Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_view/helpers/asset_tag_helper.rb
* Fix time_zone_options_for_select to not mutate TimeZones arrayBrian McManus2013-02-191-0/+7
| | | | | | | | | | Previous implementation of time_zone_options_for_select did not dup the ActiveSupport::TimeZone.all array. When :priority_zones were provided the method would reject! the zones from the memoized TimeZones array thus affecting future requests to the server. Essentially whatever zones were specified as :priority_zones would show up for the first request but then disappear from the time zone options on future requests.
* Improve img alt attribute for screen readersthenickcox2013-02-091-1/+2
| | | | | | | | | | | | Currently, the img_alt method in ActionView keeps underscores in the alt attribute. Because underscores are pronounced in Apple's VoiceOver Utility, this has serious implications for accessibility. This patch makes underscored or hyphenated file names (both common in projects) read more naturally in screen readers by replacing them with spaces. See method documentation for details. Added documentation to image_alt method
* partials inside directory work with `assert_template`Yves Senn2013-02-041-0/+12
| | | | | | | | | | previously when a partial was placed inside a directory (eg. '/dir/_partial'), `assert_template` did not replace the '_' prefix when looking through rendered tempaltes, which resulted in an error. I modified it to replace both, the leading '_' and the last '_' after a '/'.
* descriptive `assert_template` error when partial wasn't renderedYves Senn2013-02-041-0/+9
| | | | | | | When `assert_template` is used with the :locals option, and the partial was not rendered, a method_missing error was raised. This changes first checks, if the partial actually was rendered and raises a descriptive error.
* Fix `content_tag_for` with array html option.Semyon Perepelitsa2013-01-311-0/+6
| | | | | | | | | | | | | | | | | It would embed array as string instead of joining it like `content_tag` does: content_tag(:td, class: ["foo", "bar"]){} #=> '<td class="foo bar"></td>' Before: content_tag_for(:td, item, class: ["foo", "bar"]){} #=> '<td class="item [&quot;foo&quot;, &quot;bar&quot;]" id="item_1"></td>' After: content_tag_for(:td, item, class: ["foo", "bar"]){} #=> '<td class="item foo bar" id="item_1"></td>'
* Make current_url? work with a HEAD methodMichiel Sikkes2013-01-281-0/+6
| | | | | | ActionDispatch::Head was removed in favor of Rack::Head. But Rack::Head does not convert GET requests to HEAD requests so we need to do checking for HEAD requests ourselves.
* Use Encoding::UTF_8 constant :do_not_litter:Akira Matsuda2013-01-282-5/+5
|
* Stylistic pass at form_helper_testRafael Mendonça França2013-01-211-286/+362
|
* Capture block so content won't leak.José Mota2013-01-211-0/+57
| | | | | | | | | | | | | | The [following pull request](https://github.com/rails/rails/pull/8916) fixed the block being passed to the appropriate helper method. However, the content being passed into the block is generating repeated markup on the page due to some weird ERb evaluation. This commit tries to capture the block's generated output so the page isn't flooded with markup. [Rafael França + José Mota] Closes #8936
* Remove i18n symbol dependencyChris McGrath2013-01-171-3/+8
| | | | | | | | | date.order is the only key in rails i18n that is required to be a symbol. This patch allows for symbols or strings which means: * No requirement for symbol type in .yml files. A future YAML.safe_load wouldn't need to load symbols * Rails could actually use json rather than yml as the backend
* Fix date_select :selected option so you can pass it nilColin Burn-Murdoch2013-01-161-1/+64
|
* Merge pull request #8938 from colinbm/date_select_valueSteve Klabnik2013-01-141-2/+50
|\ | | | | Rename :value to :selected for date_select, and add missing tests/docs
| * Rename :value option to :selected, in line with other select helpersColin Burn-Murdoch2013-01-141-2/+50
| | | | | | | | | | Add tests for time & datetime. Add documentation.
* | Revert benchmark helper regression. Use a #capture within a #benchmarkJeremy Kemper2013-01-141-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | block. Breaks benchmark calls that return non-String values otherwise. Revert "add benchmark helper that works in erb" This reverts commit 904e544cc8f5846de7c31827bb5556c6a238c0de. Conflicts: actionpack/lib/action_view/helpers.rb actionpack/lib/action_view/helpers/benchmark_helper.rb actionpack/test/template/benchmark_helper_test.rb
* | Merge pull request #8916 from josemota/collection-with-blockRafael Mendonça França2013-01-131-0/+49
|\ \ | |/ |/| | | | | Collection radio buttons and collection check boxes through FormBuilder render the provided block. Closes #8897
| * Collection radio buttons and collection check boxes through FormBuilder renderJosé Mota2013-01-121-0/+49
| | | | | | | | | | | | | | | | the provided block. In the case of having a form_for method being called, the block for each collection would not be passed and thus the result expected was always the same. This patch passes the block to the original method like it would be assumed.
* | Allow value to be set on date_selectColin Burn-Murdoch2013-01-131-0/+21
| |
* | Associaton -> AssociationSteve Klabnik2013-01-131-2/+2
|/
* Merge pull request #8623 from virusman/form_helpers_collectionproxy_fixJon Leighton2013-01-111-0/+23
|\ | | | | Fixed nested fields bug when called with AssociationProxy
| * Test nested fields with AssociationProxy mockup & fix AssociationProxy ↵virusman2012-12-271-0/+23
| | | | | | | | support in form helper
* | view_cache_dependency APIJamis Buck2013-01-081-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | A declarative API for specifying dependencies that affect template cache digest computation. In your controller, specify any of said dependencies: view_cache_dependency { "phone" if using_phone? } When the block is evaluated, the resulting value is included in the cache digest calculation, allowing you to generate different digests for effectively the same template. (Mostly useful if you're mucking with template load paths.)
* | set 'alt' attribute for image_submit_tagNihad Abbasov2013-01-081-2/+2
| |
* | Do not generate local vars for partials without object or collectionCarlos Antonio da Silva2013-01-081-0/+7
| | | | | | | | | | | | | | | | | | Previously rendering a partial without giving :object or :collection would generate a local variable with the partial name by default. This was noticed due to warnings in Ruby 2.0 of not used variables, which turned out to be the generation of not used variables inside partials that do not contain objects related to them.
* | Do not call fields_for from form_for, to avoid instantiating two buildersCarlos Antonio da Silva2013-01-061-1/+13
| |
* | deprecate `assert_blank` and `assert_present`.Yves Senn2013-01-051-1/+1
| | | | | | | | | | They don't add any benefits over `assert object.blank?` and `assert object.present?`