aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
Commit message (Collapse)AuthorAgeFilesLines
* Favor `public_folder: true` over `public_*`schneems2016-08-292-144/+3
| | | | Adding all those `public_*` methods is a bit heavy handed, we can change the API to instead use `public_folder: true`. Change was pretty easy since it was already implemented that way.
* Fix formattingschneems2016-08-292-23/+22
|
* Add `public_*` helpers to all the `_tag` methods.schneems2016-08-291-10/+58
|
* Match method signatureschneems2016-08-291-3/+3
|
* Add docs to `public_*_path` methods & fix commentsschneems2016-08-291-15/+36
|
* Add public URL helpersschneems2016-08-291-0/+56
|
* Add descriptive commentschneems2016-08-291-7/+7
|
* Make sure routes don't interfere with pathsschneems2016-08-291-0/+11
|
* Allow a more explicit public behaviorschneems2016-08-291-2/+37
| | | | | We want to make it more explicit when a user wants to avoid the asset pipeline to do this we will add `public_*` methods to all path helpers. So if someone wants to use an asset that isn't maintained by the asset pipeline they can use `public_asset_path` instead of `asset_path` and letting it fall through. The main reason for this change is the desire to raise helpful errors in the future. Right now if you typo an asset name, then we assume you intended an asset in the `public/` folder and not in the pipeline so nothing fails and the error sits silently until you realize the page didn't render correctly. We have to deprecate today so we can raise meaningful error messages in the future.
* Simplify cache hit loggingAaron Patterson2016-08-241-3/+4
| | | | | | | CacheHelper is mixed in to Helpers, Helpers is mixed in to AV::Base. This means we can count on instances of AV::Base to have the "cache hit" method on them, and we can stop setting an ivar for cache logging and just ask the view if it was a cache hit.
* Improve TagHelper#tag_option performanceAmadeus Folego2016-08-221-2/+2
| | | | | | Freeze string literals and use String instead of Regex inside gsub call. This should improve performance from 20% up to 50% on most cases.
* Add three new rubocop rulesRafael Mendonça França2016-08-167-22/+22
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Ensure values are strings before calling gsubMike Virata-Stone2016-08-121-1/+1
|
* ensure tag/content_tag escapes " in attribute valsAndrew Carpenter2016-08-111-1/+1
| | | | | | Many helpers mark content as HTML-safe without escaping double quotes -- including `sanitize`. Regardless of whether or not the attribute values are HTML-escaped, we want to be sure they don't include double quotes, as that can cause XSS issues. For example: `content_tag(:div, "foo", title: sanitize('" onmouseover="alert(1);//'))` CVE-2016-6316
* revises more Lint/EndAlignment offensesXavier Noria2016-08-081-9/+9
|
* Modify LogSubscriber for single partial's cache message.Stan Lo2016-08-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement naive partial caching mechanism. Add test for LogSubscriber Use ActionView::Base#log_payload to store log_subscriber's payload, so we can pass cache result into it. Fixed tests Remove useless settings Check if #log_payload exists before calling it. Because other classes also includes CacheHelper but don't have is attribute Use @log_payload_for_partial_reder instead of #log_payload to carry ActionView's payload. Update test's hash syntax Add configuration to enable/disable fragment caching logging Remove unless test and add new test to ensure cache info won't effect next rendering's log Move :enable_fragment_cache_logging config from ActionView to ActionPack Apply new config to tests Update actionview's changelog Update configuration guide Improve actionview's changelog Refactor PartialRenderer#render and log tests Mute subscriber's log instead of disabling instrumentation. Fix typo, remove useless comment and use new hash syntax Improve actionpack's log_subscriber test Fix rebase mistake Apply new config to all caching intstrument actions
* applies remaining conventions across the projectXavier Noria2016-08-066-77/+72
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-0614-289/+289
|
* modernizes hash syntax in actionviewXavier Noria2016-08-0614-68/+68
|
* applies new string literal convention in actionview/libXavier Noria2016-08-0628-170/+170
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* systematic revision of =~ usage in AVXavier Noria2016-07-254-16/+22
| | | | | Where appropriate, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
* Explain meaning of the code very well and Remove confusion. [ci skip]Santosh Wadghule2016-07-231-4/+4
| | | | | | Code like `render(topics) => render("topics/topic")` adds confusion for the readers. On first impression, that code feels like hash kind of data, but it's not. So make it more clear and meaningful.
* Bring back support for callable cache_key on collection renderingIgnatius Reza2016-07-211-3/+12
|
* Merge pull request #25520 from st0012/fix-current-pageRafael França2016-07-201-0/+2
|\ | | | | Fix ActionView::Helpers#current_page? with trailing space issue.
| * Fix ActionView::Helpers#current_page? with issue in ↵Stan Lo2016-07-201-0/+2
| | | | | | | | https://github.com/rails/rails/issues/19472
* | Fix docs in collection_radio_buttonsclaudiob2016-07-181-3/+3
| | | | | | | | [ci skip] Just some english and `<tt>` tags.
* | Tiny documentation fixes [ci skip]Robin Dupret2016-07-041-4/+9
| | | | | | | | | | | | Fix a link to use RDoc syntax and make sure that the titles' level match the section we are in since we are both documenting the new and the legacy syntax.
* | Merge pull request #25553 from vipulnsward/25543-docs-follow-upVipul A M2016-06-301-16/+7
|\ \ | | | | | | 25543 docs cleanup
| * | - Tone down documentationVipul A M2016-06-281-16/+7
| | | | | | | | | | | | | | | | | | | | | - Remove repetative docs - Fix grammar on sentences - Add escaping for literals [ci skip]
* | | Add dup leftover from 26710ab.Kasper Timm Hansen2016-06-281-1/+1
| | |
* | | Default to frozen string literals in TagHelper.Kasper Timm Hansen2016-06-281-5/+7
| | | | | | | | | | | | Removes littering `freeze` calls with Ruby 2.3's magic comment.
* | | Merge pull request #25555 from vipulnsward/boolean-attributes-updateRafael França2016-06-282-8/+11
|\ \ \ | | | | | | | | Bring Boolean Attributes list for AV Tags helper upto speed with current spec
| * | | Bring Boolean Attributes list for AV Tags helper upto speed with current spec.Vipul A M2016-06-282-8/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | This is based on https://github.com/kangax/html-minifier/blob/6b2d4536d82819143b468b41a89c700b6c61631f/src/htmlminifier.js#L197 and spec from https://www.w3.org/TR/html51/single-page.html. Couple of other changes to tests due to support update: - autobuffer has been dropped in favour of preload attribute, ref: https://msdn.microsoft.com/en-us/library/ff974743(v=vs.85).aspx - pubdate attribute has been dropped from spec, ref: https://www.w3.org/html/wg/tracker/issues/185
* | | Merge pull request #25551 from vipulnsward/25543-follow-upKasper Timm Hansen2016-06-281-1/+1
|\ \ \ | | | | | | | | Expand list of void elements to match spec
| * | | Expand list of void elements to match spec from ↵Vipul A M2016-06-281-1/+1
| |/ / | | | | | | | | | https://html.spec.whatwg.org/multipage/syntax.html#void-elements
* / / Freeze string for default content for tag_strings, which later goes on to ↵Vipul A M2016-06-281-1/+1
|/ / | | | | | | create new content. This should also be inline with content being passed should not be mutable
* | Document `simple_format` handling of `\r`Derek Prior2016-06-271-4/+5
| | | | | | | | | | | | | | `simple_format` handles `\r\n` and `\r` but previously did not document this behavior. The handling is done with a `gsub` in `split_paragraphs`. [ci skip]
* | New syntax for tag helpers i.e. tag.br instead of tag(br) #25195Marek2016-06-273-59/+176
| |
* | Fix typo in exception class nameCédric Félizard2016-06-261-1/+1
| |
* | Merge pull request #25287 from marekkirejczyk/fix_25267Godfrey Chan2016-06-251-1/+1
|\ \ | |/ |/| Make select_year work with include_position: true option, fix #25267
| * Make select_year work with include_position: true option, fix #25267Marek2016-06-051-1/+1
| |
* | Change datetime to datetime-local helper tagHerminio Torres2016-06-213-55/+11
| | | | | | | | | | | | | | | | | | | | | | A change was made in the helper that renders the `datetime`, being now by default `datetime-local` and creating an alias of `datetime-local` for `datetime`, `datetime` tag and it passes to be an abstract class for all other tags that inherit from him. As a new specification of the HTML 5 the text field type `datetime` will no longer exist and will pass a `datetime-local`. Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
* | Revert "Merge pull request #17973 from maurogeorge/file_field_hidden_field"eileencodes2016-06-212-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The reason we are reverting this commit is because it created breaking changes for file upload gems. For more information see discussion here: https://github.com/rails/rails/issues/17947#issuecomment-225154294 This reverts commit c455817804e4df64c46c17a0cdec0e5a1ca5ba2e, reversing changes made to 8b3cd74b8a09ef85a43d7631bb062a9ec7f57227. Conflicts: actionview/CHANGELOG.md actionview/lib/action_view/helpers/form_helper.rb
* | Explicitly require `acts_like` in AVSean Griffin2016-06-131-0/+1
| | | | | | | | | | | | This method is used in `distance_of_time_in_words` Fixes #25357
* | remove deprecated `:prefix` option from doc [ci skip]yuuji.yaginuma2016-06-091-2/+0
| | | | | | | | The option was deprecated in #21191.
* | Fix a typo in `time_field` [ci skip]Jake Worth2016-06-051-1/+1
|/
* Confirm with the specification when generating emtpy option for select with ↵Vipul A M2016-05-211-1/+3
| | | | | | | | | | | | `include_blank: true` option. We now generate option with empty label, example: `<select id="places" name="places"><option value="" label=" "></option></select>` for include_blank: true. This is only done, if content is missing on the option, and we providing the value from this option. Fixes #24816
* `md5` --> `MD5`Jon Moss2016-05-171-3/+3
| | | | | Sorry, I missed a few places in my last PR. This should be the last of 'em :grimacing:
* Fix example for css_class_attribute and fix indentationPrathamesh Sonpatki2016-04-201-6/+6
|
* [ci skip] Small grammar fixAbhishek Jain2016-04-201-1/+1
|