aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Formatting CHANGELOGs [ci skip]Ryuta Kamizono2018-09-071-3/+9
| | | | Fixing code block rendering, indentation, backticks, etc.
* Merge pull request #33547 from Ana06/patch-1Matthew Draper2018-08-231-0/+10
|\ | | | | | | Use public_send in value_for_collection
| * Deprecate use of private methods in view's helpersAna María Martínez Gómez2018-08-081-2/+2
| | | | | | | | | | Instead of dropping it completely in case someone is relying (probably inadvertenly) on it.
| * Add one more method affected in CHANGELOGAna María Martínez Gómez2018-08-081-2/+3
| |
| * Use public_send in value_for_collectionAna María Martínez Gómez2018-08-071-0/+10
|/ | | | | | Avoid exposing private methods in view's helpers. Fixes https://github.com/rails/rails/issues/33546
* Fix issue with `button_to`'s `to_form_params`Georgi Georgiev2018-07-161-0/+11
| | | | | | | | | `button_to` was throwing exception when invoked with `params` hash that contains symbol and string keys. The reason for the exception was that `to_form_params` was comparing the given symbol and string keys. The issue is fixed by turning all keys to strings inside `to_form_params` before comparing them.
* Merge pull request #33286 from ph3t/add-changelog-entry-for-42c3537Ryuta Kamizono2018-07-041-1/+13
|\ | | | | | | Add changelog entry for 42c3537 [ci skip]
| * Add changelog entry for 42c3537 [ci skip]Juan Broullon2018-07-031-1/+11
|/
* Merge pull request #32190 from liwii/use_year_namesRyuta Kamizono2018-06-211-0/+18
|\ | | | | | | Add `use_year_names` option to date_select tag
| * Add `year_format` option to date_select tag. This option makes it possible ↵Koki Ryu2018-06-101-0/+16
|/ | | | | | | | | | | | | | | | | to customize year names. Lambda should be passed to use this option. Example: date_select('user_birthday', '', start_year: 1998, end_year: 2000, year_format: ->year { "Heisei #{year - 1988}" }) The HTML produced: <select id="user_birthday__1i" name="user_birthday[(1i)]"> <option value="1998">Heisei 10</option> <option value="1999">Heisei 11</option> <option value="2000">Heisei 12</option> </select> /* The rest is omitted */
* Make JS views rendered work with content security policyyuuji.yaginuma2018-04-201-0/+7
| | | | | | | | As of now, `HTMLElement.nonce` seems to work only in Chrome. So, it should not be used now. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/nonce#Browser_compatibility Fixes #32577.
* Add the `nonce: true` option for `javascript_include_tag` helper.Yaroslav Markin2018-04-171-0/+6
|
* Fix `actionview/CHANGELOG.md`bogdanvlviv2018-04-071-2/+2
| | | | | | | | - Add missing dots at the end of sentences. - Wrap RecordTagHelper into `. - `RecordTagHelper` => `ActionView::Helpers::RecordTagHelper`. [ci skip]
* Remove RecordTagHelperYoshiyuki Hirano2018-04-071-0/+4
| | | | | | | * Since #18411, we started to inform about extracted gem (record_tag_helper) to developers who use `ActionView::Helpers::RecordTagHelper` 's methods. * Currently, it seems no problem that we don't have to support no longer.
* Add `action_view.finalize_compiled_template_methods` config optionSimon Coffey2018-04-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | ActionView::Template instances compile their source to methods on the ActionView::CompiledTemplates module. To prevent leaks in development mode, where templates can frequently change, a finalizer is added that undefines these methods[1] when the templates are garbage-collected. This is undesirable in the test environment, however, as templates don't change during the life of the test. Moreover, the cost of undefining a method is proportional to the number of descendants a class or module has, since the method cache must be cleared for all descendant classes. As ActionView::CompiledTemplates is mixed into every ActionView::TestCase (or in RSpec suites, every view spec example group), it can end up with a very large number of descendants, and undefining its methods can become very expensive. In large test suites, this results in a long delay at the end of the test suite as all template finalizers are run, only for the process to then exit. To avoid this unnecessary cost, this change adds a config option, `action_view.finalize_compiled_template_methods`, defaulting to true, and sets it to false in the test environment only. [1] https://github.com/rails/rails/blob/09b2348f7fc8d4e7191e70e06608c5909067e2aa/actionview/lib/action_view/template.rb#L118-L126
* Extract the confirm call in its own, overridable method in rails_ujsMathieu2018-04-011-0/+8
|
* Remove changelog header for unreleased versionRafael Mendonça França2018-03-131-2/+0
| | | | | | We only add the header when releasing to avoid some conflicts. [ci skip]
* Fix CHANGELOGs [ci skip]bogdanvlviv2018-03-121-5/+5
| | | | | | | | - Add missing dots. - Remove reference to itself on GitHub. Usually, we add references to fixed issues only in a changelog. Follow up #32223
* Remove CHANGELOG entries which were backported to 5-2-stableRyuta Kamizono2018-02-281-5/+3
|
* Let select render default selected option for required fieldSerj Prikhodko2018-02-271-0/+21
|
* Don't enforce UTF-8 by defaultAndrew White2018-02-271-0/+8
| | | | | | With the disabling of TLS 1.0 by most major websites, continuing to run IE8 or lower becomes increasingly difficult so default to not enforcing UTF-8 encoding as it's not relevant to other browsers.
* Change translation key of submit_tag from module_name_class_name to ↵Rui Onodera2018-02-271-0/+4
| | | | | | | | | | module_name/class_name Currently submit_tag value translation does not support i18n key style locale key. It confuses me a bit because many other components support i18n key style locale key. I added i18n key style locale key support to submit tag.
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+5
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-77/+1
| | | | :tada::tada::tada:
* Allow the use of callable objects as group methods for grouped selects.Jérémie Bonal2017-12-271-0/+8
| | | | | | Replaced the uses of `group.send(...)` in `option_groups_from_collection_for_select` by calls to `value_for_collection(group, ...)`, allowing the use of procs, lambdas and other callable objects as parameters.
* Tweaks CHANGELOGs [ci skip]Ryuta Kamizono2017-12-011-1/+1
|
* Add preload_link_tag helper.Guillermo Iguaran2017-11-281-0/+8
| | | | | | | | | | | This helper creates a link tag with preload keyword that allows to browser to initiate early fetch of resources. Additionally this send Early Hints if supported. See https://github.com/rails/rails/pull/30744/commits/59a02fb7bcbe68f26e1e7fdcec45c00c66e4a065 for more details about Early Hints. Preload spec: https://w3c.github.io/preload/
* Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
|
* Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
|
* Change `form_with` to generates ids by defaultnpezza932017-11-251-0/+11
| | | | | | | | | | When `form_with` was introduced we disabled the automatic generation of ids that was enabled in `form_for`. This usually is not an good idea since labels don't work when the input doesn't have an id and it made harder to test with Capybara. You can still disable the automatic generation of ids setting `config.action_view.form_with_generates_ids` to `false.`
* Fix field_error_proc wrap form select optgroup and divider option tagneumayr2017-11-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | ### Summary The [`:field_error_proc`](https://github.com/rails/rails/blob/master/actionview/lib/action_view/base.rb#L145) is responsible for decorating input tags that refer to attributes with errors. This default build-in rails feature wrap invalid form elements with additional markup: `<div class="field_with_errors">[…]</div>`. * Fix for `field_error_proc` wraps form select `optgroup` * Fix for `field_error_proc` wraps form select divider `option` * Add tests for uncovered elements with errors [Fixes #31088] #### Test coverage * `test_select_grouped_options_with_errors` * `test_time_zone_select_with_priority_zones_and_errors` #### Extend test coverage * `test_collection_select_with_errors` * `test_label_with_errors` * `test_check_box_with_errors` * `test_check_boxes_with_errors` * `test_radio_button_with_errors` * `test_radio_buttons_with_errors` * `test_collection_check_boxes_with_errors` * `test_collection_radio_buttons_with_errors`
* Remove deprecated Erubis ERB handlerRafael Mendonça França2017-10-231-0/+4
|
* Do not generate default alt text in image tagsCameron Cundiff2017-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | - Auto-generating content from the filename of an image is not suitable alternative text; alt text that isn't fully considered can be distracting and fatiguing for screen readers users (blind, low vision, dyslexic people). - Setting a filename fallback short circuits screen reader default behavior and configuration for blank descriptions. - Setting poor defaults also creates false negatives for accessibility linting and testing software, that makes it harder to improve application accessibility. *** - After this change, if authors leave images without alt text, screen readers will fallback to default behavior for missing alt text. - Also with this change, Automated linting and testing tools will correctly generate warnings. [Fixes #30096]
* Merge pull request #29349 from robertomiranda/responsive-imagesMatthew Draper2017-07-021-0/+4
|\ | | | | | | Add srcset option to image_tag helper
| * Add `srcset` option to `image_tag` helperRoberto Miranda2017-06-291-0/+4
|/
* :scissors:Ryuta Kamizono2017-06-281-4/+4
| | | | [ci skip]
* Add changes to CHANGELOGsavroff2017-06-191-0/+6
| | | | | | fix fix
* Generate field ids in `collection_check_boxes` and `collection_radio_buttons`yuuji.yaginuma2017-06-111-0/+8
| | | | | This makes sure that the labels are linked up with the fields. Fixes #29014
* Add :json type to auto_discovery_link_tagMike Gunderloy2017-05-201-0/+4
| | | | | This allows auto_discovery_link_tag to support the JSON Feed standard. See https://jsonfeed.org/version/1 for more information.
* Cleanup CHANGELOGs [ci skip]Ryuta Kamizono2017-04-301-1/+2
| | | | | | * Remove trailing spaces. * Add backticks around method and command. * Fix indentation.
* Ensure input to distance_of_time_in_words is not nilJay Hayes2017-04-271-0/+5
| | | | | | | | | | | | | | | | * Internally all input is converted to time so that it can be treated uniformly. Remove now-unneeded condition * Now that all input is treated is converted to time, we no longer need to type check it. Rename variables to clarify their purpose Extract private method to normalize distance_of_time args to time Update actionview changelog
* Start Rails 5.2 developmentMatthew Draper2017-03-221-216/+1
|
* Merge pull request #28407 from claudiob/changelog-skip-pipelineRichard Schneeman2017-03-131-0/+17
|\ | | | | Add CHANGELOG for #26226 [ci skip]
| * Add CHANGELOG for #26226 [ci skip]claudiob2017-03-131-0/+17
| |
* | Small grammar change + new line for "fixes"Jon Moss2017-03-131-2/+4
|/ | | | [ci skip]
* Remove `encode_special_chars` option from `strip_tags`Andrew Hood2017-02-271-0/+7
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-0/+2
|
* Change ActionView ERB Handler from Erubis to ErubiJeremy Evans2017-01-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Erubi offers the following advantages for Rails: * Works with ruby's --enable-frozen-string-literal option * Has 88% smaller memory footprint * Does no freedom patching (Erubis adds a method to Kernel) * Has simpler internals (1 file, <150 lines of code) * Has an open development model (Erubis doesn't have a public source control repository or bug tracker) * Is not dead (Erubis hasn't been updated since 2011) Erubi is a simplified fork of Erubis that contains just the parts that are generally needed (which includes the parts that Rails uses). The only intentional difference in behavior is that it does not include support for <%=== tags for debug output. That could be added to the ActionView ERB handler if it is desired. The Erubis template handler remains in a deprecated state so that code that accesses it directly does not break. It can be removed after Rails 5.1.
* Allow render locals to be assigned to instance variablesAndrew White2017-01-151-0/+6
| | | | | | | | | In #26672 we blocked use of Ruby keywords as identifiers for view locals but inadvertently broke the use of instance variable names as identifiers. Whilst not explicitly documented this behavior has been around for a long time and there's no need to break it now. Fixes #27480.
* Add `check_parameters` option to `current_page?`Maksym Pugach2017-01-041-0/+4
| | | | | | | | | | | | | | | Example: For "http://www.example.com/shop/checkout?order=desc&page=1" current_page?('http://www.example.com/shop/checkout') => true current_page?( 'http://www.example.com/shop/checkout', check_parameters: true ) => false