aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
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
|
* Merge pull request #26516 from grosser/grosser/assertRafael França2016-09-164-11/+11
|\ | | | | improve error message when include assertions fail
| * improve error message when include assertions failMichael Grosser2016-09-164-11/+11
| | | | | | | | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* | Merge pull request #26509 from claudiob/rename-asRafael França2016-09-161-1/+1
|\ \ | | | | | | Rename test to match what it does
| * | Rename test to match what it doesclaudiob2016-09-151-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Commit d270da569 changed the `form_for` API from `:object_name` to `:as`. It also change the related test body, but not its title, which is changed here. See https://github.com/rails/rails/commit/d270da569efeabd7cd563028816452236713aa9f#diff-52455f1e82acf12551bc5e7e26b82008 I realize this is a small commit but I was having trouble understanding what the test was about since there is no "object_name" in the code. I imagine the same may happen to other developers, therefore this commit.
* | Merge pull request #26507 from Neodelf/actionview_duplicateRafael França2016-09-162-6/+2
|\ \ | |/ |/| DRYing duplicate methods
| * DRYing duplicate methodsAndrey Molchanov2016-09-162-6/+2
| |
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-1411-49/+49
|/ | | | | | 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.
* Fix broken heredoc indentation caused by rubocop auto-correctRyuta Kamizono2016-09-031-16/+17
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency.
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-6/+7
|
* fix RuboCop errors re \xFCXavier Noria2016-09-021-2/+4
|
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-014-5/+5
|
* 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.
* Add load hooks to all tests classesRafael Mendonça França2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Usually users extends tests classes doing something like: ActionView::TestCase.include MyCustomTestHelpers This is bad because it will load the ActionView::TestCase right aways and this will load ActionController::Base making its on_load hooks to execute early than it should. One way to fix this is using the on_load hooks of the components like: ActiveSupport.on_load(:action_view) do ActionView::TestCase.include MyCustomTestHelpers end The problem with this approach is that the test extension will be only load when ActionView::Base is loaded and this may happen too late in the test. To fix this we are adding hooks to people extend the test classes that will be loaded exactly when the test classes are needed.
* kick different instrumentation methodAaron Patterson2016-08-241-8/+12
| | | | | | | We can eliminate a conditional by calling a different instrumentation method depending on the situation. In this case, we'll call the special case "!render_template" instrumentation method and eliminate the case / when clause from the `instrument` method.
* remove useless freezeAaron Patterson2016-08-241-1/+1
| | | | Ruby already does this freeze for us.
* Simplify cache hit loggingAaron Patterson2016-08-242-5/+5
| | | | | | | 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-1640-145/+145
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Merge pull request #26100 from vipulnsward/changelogsRafael França2016-08-121-1/+1
|\ | | | | Pass over changelogs
| * Pass over changelogs [ci skip]Vipul A M2016-08-101-1/+1
| |
* | Ensure values are strings before calling gsubMike Virata-Stone2016-08-122-1/+9
| |
* | ensure tag/content_tag escapes " in attribute valsAndrew Carpenter2016-08-112-1/+11
| | | | | | | | | | | | 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
* | Fix actionview test failureRyuta Kamizono2016-08-112-3/+3
| | | | | | | | Caused by #26092.
* | prefer __dir__ over __FILE__ in File.expand_pathXavier Noria2016-08-111-1/+3
| | | | | | | | | | | | Thinking .. relative to files is not natural, we are used to think "parent of a directory", and we have __dir__ nowadays.
* | Fix broken alignments caused by auto-correct commit 411ccbdRyuta Kamizono2016-08-102-4/+7
|/ | | | Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
* revises more Lint/EndAlignment offensesXavier Noria2016-08-081-9/+9
|
* code gardening: removes redundant selfsXavier Noria2016-08-087-9/+8
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* Extract common view cache dependency setup.Kasper Timm Hansen2016-08-071-8/+9
|
* Move CHANGELOG entry to the top.Kasper Timm Hansen2016-08-071-11/+11
|