aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merge pull request #20625 from Envek/add_country_zones_methodJeremy Daer2016-04-191-4/+5
|\ | | | | | | Add ActiveSupport::TimeZone.country_zones helper
* \ Merge pull request #24225 from ↵Rafael Mendonça França2016-04-201-3/+19
|\ \ | | | | | | | | | | | | | | | neumayr/date_select_helper_with_css_classes_accept_hash date_select helper with_css_classes option also accept a hash
| * | date_select helper with_css_classes option also accept a hashneumayr2016-04-051-3/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `date_select` helper `:with_css_classes` option now accepts a hash of strings for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend the select type with the given css class value. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %> ``` ```html <select id="user_birthday_3i" name="user[birthday(3i)]">…</select> <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select> <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select> ``` Optional, add global `html_options` to modify every select tag in the set. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" }, { class: "my-date optional" } %> ``` Supported DateHelper methods: `select_day`, `select_month`, `select_year`, `select_hour`, `select_minute`, `select_second`, `select_datetime`, `select_time`, `time_select`, `date_select` and `datetime_select`. `:with_css_classes` option was added to the `date_select` with #7975.
* | Merge pull request #23869 from oreoshake/to-sentence-html-safetyRafael França2016-04-201-0/+30
|\ \ | |/ |/| Add html_safe support to ActionView Array#OutputSafetyHelper
| * mimic ActiveSupport's Array#to_sentence in an html_safe-aware wayNeil Matatall2016-03-151-0/+30
| |
* | `number_to_phone` formats number with regexpPan GaoYong2016-04-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | By default, this method formats US number. This commit extends its functionality to format number for other countries with a custom regular expression. number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/) # => 188-1234-5678 The output phone number is divided into three groups, so the regexp should also match three groups of numbers.
* | Merge pull request #24379 from Gaurav2728/sanitizer-helper-update-docKasper Timm Hansen2016-03-311-1/+1
|\ \ | | | | | | sanitiser helper may be remove in 5.1, update doc [ci skip]
| * | sanitiser helper may be remove in 5.1, update doc [ci skip]Gaurav Sharma2016-03-311-1/+1
| | | | | | | | | using `rails-html-sanitizer` gem still Rails providing strip_tags, strip_links features. May be remove in 5.1
* | | Deprecate `datetime_field` and `datetime_field_tag` helpers.Wojciech Wnętrzak2016-03-312-0/+8
|/ / | | | | | | | | Datetime input type was removed from HTML specification. One can use `datetime_local_field` and `datetime_local_field_tag` instead.
* | fix a comment in atom_feed_helper.rb白井 健太2016-03-161-1/+1
| |
* | - Freeze strings in frequent used private methodStan Lo2016-03-081-11/+11
| | | | | | | | | | reduce string allocation. - Use freezed empty string instead of create one every time we need to return it
* | Revert "Merge pull request #22764 from ↵Rafael Mendonça França2016-03-051-2/+0
|/ | | | | | | | | | stevenspiel/titleize_model_name_for_default_submit_button_value" This reverts commit 4158974c60d817c9bc1e2aecb342161295f2ac0d, reversing changes made to 3d590add45b7ff1de972d99b076cb504d5208935. Reason: This break i18n in some languages. See https://github.com/rails/rails/issues/791#issuecomment-192724640
* We are calling `to_s` in the method so we can call downcase nowRafael Mendonça França2016-02-221-3/+3
|
* Make per form token work when method is not providedRafael Mendonça França2016-02-221-1/+2
| | | | | | When `button_to 'Botton', url` form was being used the per form token was not correct because the method that is was being used to generate it was an empty string.
* Do not pass more options that are needed.Rafael Mendonça França2016-02-221-1/+1
| | | | | We only need action and method so pass them explicitly instead of merging the hash with HTML options.