aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Replace to closing tagAndrey Molchanov2016-09-201-1/+1
|
* [ci skip] Fixed commas according to Oxford comma in rdoc and guidesAndrey Molchanov2016-09-171-1/+1
|
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-142-6/+6
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* Fix Remaining Case-In-Assignment Statement FormattingAlex Kitchens2016-09-062-24/+26
| | | | | | | | | Recently, the Rails team made an effort to keep the source code consistent, using Ruboco (bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case statements were missed. This changes the case statements' formatting and is consistent with changes in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-6/+7
|
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-012-2/+2
|
* fix document for radio_buttonshingo-nakanishi2016-09-011-1/+2
| | | | add `# Let's say that @user.receive_newsletter returns "no":` for `def radio_button(object_name, method, tag_value, options = {})`. fix `# Let's say that @user.category returns "no":` to `# Let's say that @user.receive_newsletter returns "no":`
* remove warning from `video_tag`yuuji.yaginuma2016-09-011-3/+3
| | | | | | | | This removes the following warning. ``` actionview/lib/action_view/helpers/asset_tag_helper.rb:291: warning: shadowing outer local variable - options ```
* Fix styleschneems2016-08-301-5/+5
|
* Better keyword argument nameschneems2016-08-301-3/+3
|
* Address comment via @dhh, better option namingschneems2016-08-302-19/+19
|
* Document public_poster_folder optionschneems2016-08-291-0/+4
|
* Address doc style comments from @robin850schneems2016-08-291-9/+9
|
* Fully document asset_path.schneems2016-08-291-7/+58
|
* Do not deprecate using assets with leading slashschneems2016-08-291-10/+5
|
* Missed 2 public_* methods in cleanupschneems2016-08-291-16/+0
|
* 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