aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Empty array instead of nil for source_extractGuilherme Mansur2019-07-141-0/+5
| | | | | | | | | | The source_extract method will return nil when it can't find the file name in the backtrace, methods that consume this method expect an array and the nil ends up causing type errors down the road like it happened here: #36341. This patch refactors the source_extract method so that it returns an empty array instead of nil when it can't find the source code. Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>
* Autoload SyntaxErrorInTemplateGuilherme Mansur2019-06-191-0/+4
| | | | | | | | | | | | When a SyntaxError is detected in a template we raise this exception. On a first request to the server the exception we get a NameError since the exception is not required from `active_view/template/error.rb` yet. However later on it gets required and a second request will succeed. On the first request we see the rails "Something Wen Wrong" page and not the expected syntax error in template error page with the webconsole and stacktrace. By autoloading the constant we fix this issue. Co-authored-by: Gannon McGibbon <gannon.mcgibbon@gmail.com>
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`Joel Hawksley2019-06-121-0/+4
| | | | | | | | | | | | Co-authored-by: Natasha Umer <natashau@github.com> Co-authored-by: Aaron Patterson <tenderlove@github.com> Co-authored-by: Shawn Allen <shawnbot@github.com> Co-authored-by: Emily Plummer <emplums@github.com> Co-authored-by: Diana Mounter <broccolini@github.com> Co-authored-by: John Hawthorn <jhawthorn@github.com> Co-authored-by: Nathan Herald <myobie@github.com> Co-authored-by: Zaid Zawaideh <zawaideh@github.com> Co-authored-by: Zach Ahn <engineering@zachahn.com>
* Fix select_tag so that is doesn't change options when include_blank is setYounes SERRAJ2019-05-221-0/+3
|
* Start Rails 6.1 developmentRafael Mendonça França2019-04-241-253/+1
|
* Fix markup in CHANGELOGs [ci skip]Ryuta Kamizono2019-04-251-1/+1
| | | | Need to new line to break line in the markdown.
* Update the changelog to explain the fixst00122019-04-201-0/+11
|
* Fix checking for template variants when using the ActionView::FixtureResolverEdward Rudd2019-04-031-0/+4
|
* [ci skip] Follow up c8bf334104Kasper Timm Hansen2019-04-011-1/+2
|
* Only clear template caches in dev after changes (#35629)John Hawthorn2019-04-011-0/+8
|
* Tweaks CHANGELOGs and docs [ci skip]Ryuta Kamizono2019-03-311-3/+4
| | | | | | | * add leading `#` before `=>` since hash rocket is valid Ruby code * add backticks * remove trailing spaces * and more
* [ci skip] Fixed typoShailesh Kalamkar2019-03-231-1/+1
|
* Update CHANGELOGs for 6.0.0.beta3 releaseJohn Hawthorn2019-03-221-1/+10
|
* Prep releaseeileencodes2019-03-111-0/+5
| | | | | | | * Update RAILS_VERSION * Bundle * rake update_versions * rake changelog:header
* Preparing for 6.0.0.beta2 releaseRafael Mendonça França2019-02-251-0/+2
|
* Fix some typos!Aaron Patterson2019-02-061-0/+4
|
* Deprecate finalizer configuration (it doesn't do anything)Aaron Patterson2019-02-061-0/+6
| | | | | | Revert "Remove finalizer and configuration" This reverts commit 9e7b4a3173788ea43b11e74a4d2f69a5f1565daa.
* Merge branch 'float_dom_ids'Gannon McGibbon2019-02-051-0/+6
|\ | | | | | | Closes #34975.
| * Fix unique DOM IDs for collection inputsMark Edmondson2019-01-251-0/+5
| |
* | Add CHANGELOG entries for npm package renames [ci skip]Javan Makhmali2019-01-281-0/+6
| |
* | Single new line is not rendered as new line in the CHANGELOG.mdRyuta Kamizono2019-01-191-3/+4
|/ | | | | | https://github.com/rails/rails/blob/v6.0.0.beta1/actionview/CHANGELOG.md [ci skip]
* Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-181-0/+2
|
* Remove deprecated image_alt helperRafael Mendonça França2019-01-171-0/+4
|
* Don't expect defined protect_against_forgery? in {token,csrf_meta}_tagGenadi Samokovarov2018-12-271-3/+5
| | | | | | | | | | | | | | | | | | | The `#csrf_meta_tags` and `#token_tag` Action View helper methods are expecting the class in which are included to explicitly define the method `#protect_against_forgery?` or else they will fail with `NoMethodError`. This is a problem if you want to use Action View outside of Rails applications. For example, in #34788 I used the `#button_to` helper inside of the error pages templates that have a custom `ActionView::Base` subclass, which did not defined `#protect_against_forgery?` and trying to call the button failed. I had to dig inside of Action View to find-out what's was going on. I think we should either set a default method implementation in the helpers or check for the method definition, but don't explicitly require the presence of `#protect_against_forgery?` in every `ActionViews::Base` subclass as the errors are hard to figure out.
* Require Ruby 2.5 for Rails 6.Kasper Timm Hansen2018-12-191-2/+2
| | | | | | | | | | Generally followed the pattern for https://github.com/rails/rails/pull/32034 * Removes needless CI configs for 2.4 * Targets 2.5 in rubocop * Updates existing CHANGELOG entries for fewer merge conflicts * Removes Hash#slice extension as that's inlined on Ruby 2.5. * Removes the need for send on define_method in MethodCallAssertions.
* Do not disable previously disabled elementsWoH2018-12-061-0/+6
|
* Prevent unintended mouse keys from firing click eventsWoH2018-12-051-0/+13
| | | | | Firefox fires click events on left-, right- and scroll-wheel (any non-primary mouse key) clicks while other browsers don't.
* Prevent TextHelper#word_wrap from stripping white space on the leftLyle Mullican2018-11-191-0/+18
| | | | side of long lines; Fixes #34487
* Fix broken CHANGELOG markup [ci skip]Ryuta Kamizono2018-11-081-1/+1
| | | | And remove trailing spaces.
* Add allocations to template renderer subscriptionEileen Uchitelle2018-10-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | This PR adds the allocations to the instrumentation for template and partial rendering. Before: ``` Rendering posts/new.html.erb within layouts/application Rendered posts/_form.html.erb (9.7ms) Rendered posts/new.html.erb within layouts/application (10.9ms) Completed 200 OK in 902ms (Views: 890.8ms | ActiveRecord: 0.8ms) ``` After: ``` Rendering posts/new.html.erb within layouts/application Rendered posts/_form.html.erb (Duration: 7.1ms | Allocations: 6004) Rendered posts/new.html.erb within layouts/application (Duration: 8.3ms | Allocations: 6654) Completed 200 OK in 858ms (Views: 848.4ms | ActiveRecord: 0.4ms | Allocations: 1539564) ```
* respect path_only option when an array is passed into url_forJoel Ambass2018-10-011-0/+6
| | | | | | | | The url_for method is now extracting the path_only option in order to determine if polymorphic_path or polymorphic_url should be called. If the path_only option is not set it will be set to true unless the host option is set. This behaviour is the same as when a Hash or Params object is passed. To support this unifying the code responsible for setting this default value has been extracted into a private method
* 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
|