aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
Commit message (Collapse)AuthorAgeFilesLines
* allow to pass numerical value to size option in image_tagNihad Abbasov2012-09-251-1/+1
| | | | | This will set image's both width and height attributes to value passed in size option.
* Support helper tests using spec DSLMike Moore2012-09-242-1/+57
| | | | | Improve how helper tests to resolve the helper class from the test name. Add tests for helper tests using the minitest spec DSL.
* Register helper and view tests for minitest's spec DSLMike Moore2012-09-241-0/+39
|
* Merge pull request #7669 from guilleiguaran/rename-rb-handlerCarlos Antonio da Silva2012-09-171-3/+3
|\ | | | | Rename .rb template handler to .ruby to avoid conflicts with mustache classes
| * Rename .rb template handler to .ruby to avoid conflicts with mustache views ↵Guillermo Iguaran2012-09-171-3/+3
| | | | | | | | classes
* | allowing pass couple extension to register_template_handler callTima Maslyuchenko2012-09-171-0/+9
|/
* Merge pull request #7594 from guilleiguaran/rb-template-handlerRafael Mendonça França2012-09-101-0/+8
|\ | | | | Add .rb template handler
| * Add .rb template handlerGuillermo Iguaran2012-09-111-0/+8
| | | | | | | | This handler simply allows arbitrary Ruby code as a template
* | &#39 dates back to SGML when &#x27 was introduced in HTML 4.0Kalys Osmonov2012-09-096-10/+10
|/
* Add a separation option for the excerpt functionGuirec Corbel2012-09-081-0/+13
| | | | | | | | | | The separation option enable to keep entire words, lines or anything. To split by line, like github, we can set the separation option as \n. To split by word, like google, we can set the separation option as " ". The radius option represent the number of lines or words we want to have in the result. The default behaviour is the same. If we don't set the separation option, it split the text any where.
* Use the same logger that ActionView::Base for the DigestorRafael Mendonça França2012-09-051-14/+17
|
* Fix build about TemplateDigestorTest.kennyj2012-08-301-3/+3
|
* `Digestor` can now parse old style hash syntax for `render`Christos Zisopoulos2012-08-301-0/+6
|
* `Digestor` ignores most whitespace when parsing `render` invocationsChristos Zisopoulos2012-08-301-0/+23
|
* Add automatic template digests to all CacheHelper#cache calls (originally ↵David Heinemeier Hansson2012-08-291-0/+128
| | | | spiked in the cache_digests plugin) *DHH*
* Fix ActionView::RecordIdentifier to work as a singletonPiotr Sarnacki2012-08-281-0/+9
| | | | | We extend it with self, but the methods were not working properly were used directly on module.
* Deprecate Template#mime_typePiotr Sarnacki2012-08-281-0/+7
|
* Don't require action_dispatch in ActionView::UrlHelpersPiotr Sarnacki2012-08-282-2/+3
| | | | | | | | | | ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This was changed by splitting previous implementation of UrlHelper into 2 modules: ActionView::Helpers::UrlHelper and ActionView::Routing::UrlHelper. The former one keeps only basic implementation of url_for. The latter adds features that allow to use routes and is only required when url_helpers or mounted_helpers are required.
* Add ActionView::Base.default_formatsPiotr Sarnacki2012-08-281-0/+11
| | | | | | | | default_formats array is used by LookupContext in order to allow rendering templates when :formats option is not passed. Previously it was always set to Mime::SET, which created dependency on Action Pack. In order to remove this dependency, Mime::SET is used only if ActionController is loaded.
* Deprecate mime types lookup in auto_discovery_link_tagPiotr Sarnacki2012-08-281-1/+10
| | | | | | Automatically handling mime types for things other than :rss and :atom is not functionality that justifies dependency on Mime::Type from actionpack.
* Remove stubs from LogSubscriber testsPiotr Sarnacki2012-08-281-3/+4
| | | | | | | We can use another way to instantiate ActionView::Base, by passing renderer as a first option. Thanks to that we can just pass prefixes to LookupContext instead stubbing them on the controller. This is also good, because that kind of API is used in Rails code.
* Move ActionController::RecordIdentifier to ActionViewPiotr Sarnacki2012-08-281-0/+40
| | | | | | | Since it's more about DOM classes and ids it belongs to Action View better. What's more, it's more convenient to make it part of Action View to follow the rule that Action Pack can depend on Action View, but not the other way round.
* Create variable only in the test that uses itCarlos Antonio da Silva2012-08-251-3/+3
| | | | | Instead of building a Blog::Post instance for every test in form helper tests, just build it in the test that uses it.
* correct handling of date selects when using both disabled and discard optionsVasiliy Ermolovich2012-08-251-0/+24
| | | | | | | | | | | | we should take disabled option not only from `html_options` hash but from `options` hash too like `build_select` method does it. So datetime_select("post", "updated_at", { :discard_minute => true }, { :disabled => true }) datetime_select("post", "updated_at", :discard_minute => true , :disabled => true) both these variants work now closes #7431
* option_tags coerced to "" instead of nilSandeep2012-08-211-0/+12
|
* Indentation should consider line number character count.Lucas Uyezu2012-08-131-0/+9
|
* Add support for start_hour and end_hour options in select_hour helperEvan Tann2012-08-131-0/+29
| | | | Updated documentation to demonstrate start_hour and end_hour options
* Ensure option_html_attributes does not modify the given option hashesCarlos Antonio da Silva2012-08-111-0/+9
| | | | We can avoid creating extra hashes with #merge, and use #merge! instead.
* Simplify html attributes generation for options_for_selectCarlos Antonio da Silva2012-08-111-5/+6
| | | | | | | Further simplify the option_html_attributes method after the changes introduced in dacbcbe55745aa9e5484b10b11f65ccca7db1c54 to not escape the html options here (since they're going to be escaped down the chain in content tag).
* check for nil or empty record in form_forschneems2012-08-101-0/+14
| | | | if nil or an empty array is passed into form_for you get a horrible error message, this one is much more indicative of what the programmer needs to know to fix the problem.
* Do not mark strip_tags result as html_safeSantiago Pastorino2012-08-091-2/+2
| | | | | | Thanks to Marek Labos & Nethemba CVE-2012-3465
* Allow data attributes to be set as a first-level option for form_for, so you ↵David Heinemeier Hansson2012-08-081-0/+6
| | | | can write `form_for @record, data: { behavior: 'autosave' }` instead of `form_for @record, html: { data: { behavior: 'autosave' } }` *DHH*
* Deprecate `button_to_function` and `link_to_function` helpers.Rafael Mendonça França2012-08-071-0/+42
| | | | | | | | | | | | | | | | | | | | | | We recommend the use of Unobtrusive JavaScript instead. For example: link_to "Greeting", "#", :class => "nav_link" $(function() { $('.nav_link').click(function() { // Some complex code return false; }); }); or link_to "Greeting", '#', onclick: "alert('Hello world!'); return false", class: "nav_link" for simple cases. This reverts commit 3acdd652e9fe99481c879c84c5807a84eb9ad724.
* Revert "Merge pull request #7033 from kron4eg/master". Not a a fan at all of ↵David Heinemeier Hansson2012-08-071-54/+0
| | | | | | | what this makes ERB files look like. This reverts commit 46b8bceedd3e47169c50a04c93161424909c75fb, reversing changes made to 2f58795e783150f2e1b1f6c64e305703f0061129.
* Restoring the '%' trim mode for ERb templates, allowing for a leading ↵Artiom Di2012-08-071-0/+54
| | | | percent sign on a line to indicate non-inserted Ruby code.
* Do not include application.js if it doesn't existsPrem Sichanugrist2012-08-061-0/+9
| | | | | | Rails were including 'application.js' to the pack when using `javascript_include_tag :all` even there's no application.js in the public directory.
* Don't use `html_escape` to test the escapingRafael Mendonça França2012-08-054-4/+4
|
* removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-064-4/+4
| | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* Add test select_tag escapes promptSantiago Pastorino2012-08-031-0/+6
|
* load active_support/core_ext/object/inclusion in active_support/railsXavier Noria2012-08-024-4/+0
|
* Improve error handling when using partial name with hyphen. Fix #7079kennyj2012-08-031-0/+7
|
* html_escape should escape single quotesSantiago Pastorino2012-07-316-22/+22
| | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215
* Replace the flush parameter with a Hash.Lucas Mazza2012-07-241-9/+9
|
* Add one more test case to make sure that data attributes are beingRafael Mendonça França2012-07-221-0/+7
| | | | escaped
* Merge pull request #7123 from nashby/data-in-optionsRafael Mendonça França2012-07-221-7/+14
|\ | | | | don't escape options in option_html_attributes method
| * don't escape options in option_html_attributes methodVasiliy Ermolovich2012-07-221-7/+14
| | | | | | | | | | | | | | | | we don't need to escape values in this method as we pass these html attributes to `tag_options` method that handle escaping as well. it fixes the case when we want to pass html5 data options
* | Add back `:disable_with` and change deprecation horizon to 4.1Carlos Galdino + Rafael Mendonça França2012-07-212-2/+34
| |
* | Add back `:confirm` and change deprecation horizon to 4.1Carlos Galdino + Rafael Mendonça França2012-07-212-0/+86
|/
* Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-07-182-9/+16
| | | | | | | | | This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
* Common behavior with adding formats to lookup_context for TemplateRenderer ↵Dmitry Vorotilin2012-07-181-0/+10
| | | | and PartialRenderer