aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Add a hidden field on the collection_radio_buttonsMauro George2015-09-241-0/+5
| | | | | This will avoid a error be raised when the only input on the form is the `collection_radio_buttons`.
* `url_for` does not modify polymorphic optionsBernerd Schaefer2015-09-041-0/+4
| | | | | | | | | | | | | | | | | The `url_for` methods in `actionpack` and `actionview` now make a copy of the provided options before generating polymorphic paths or URLs. The bug in the previous behavior is most noticeable in a case like: url_options = [:new, :post, param: 'value'] if current_page?(url_options) css_class = "active" end link_to "New Post", url_options, class: css_class
* - Extracted `DELIMITED_REGEX` to `delimited_regex` method and made use of ↵Vipul A M2015-08-281-0/+10
| | | | | | | | | | user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means. - Added tests for number to delimited and number to currency in both actionview and activesupport. Changes Changes
* Make disable_with default in submit_tagJustin Schiff2015-08-111-0/+5
| | | | | | | | | | | | | | Prevents double submission by making disable_with the default. Default disable_with option will only be applied if user has not specified her/his own disable_with option, whether that is in the `data-disable-with` string form or the `:data => { :disable_with => "Saving..." }` hash form. disable_with will default to the value attribute. A configuration option was added to opt out of this functionality if the user so desires. `config.action_view.automatically_disable_submit_tag = false`
* Sometimes you need a specific break sequence while using word wrap and as ↵Mauricio Gomez Aguinaga2015-08-111-0/+4
| | | | | | | | | | today the only option we have is "\n" and is hardcoded. With this change you will be able to specify any break sequence ("\r\n" for example) as an option. adding proper documentation for break_sequence in ActionView::Helpers::TextHelper.word_wrap adding some more documentation for word_wrap custom break sequence and making sure we use new hash syntax
* Add wildcard template dependencies.Kasper Timm Hansen2015-07-261-0/+18
|
* Support explicit defintion of resouce name for collection caching.Dov Murik2015-07-071-0/+5
| | | | | | | | | | | | | | If a template includes `# Template Collection: ...` anywhere in its source, that name will be used as the cache name for the partial that is rendered for the collection. This allows users to enable collection caching even if the template doesn't start with `<% cache ... do %>`. Moreover, the `# Template Collection: ...` notation is recognized in all template types (and template types other than ERB can define a resource_cache_call_pattern method to allow the `cache ... do` pattern to be recognized too).
* Merge pull request #20669 from akolomiychuk/image-pathYves Senn2015-06-291-0/+4
|\ | | | | | | Passing nil to image_tag
* | Fix cache issue when different partials use the same collectionRoque Pinel2015-06-281-0/+9
| | | | | | | | | | | | | | | | | | Adds the `virtual_path` option to `cache_fragment_name` so it can be provided when needed. That allows `cache_collection_render` to get the appropriate cache key with the digest generated based on the template and prevent collision with other templates that cache the same collection.
* | Improve detection of partial templates eligible for collection caching.Dov Murik2015-06-221-0/+5
|/ | | | | | | | | | | | | | The regular expression which was used to detect partial templates that begin with a `<% cache ... do %>` call missed some cases. This commits attempts to improve the detection for some cases such as multi-line comments at the beginning of the template. The different templates are listed in two new unit test methods. Note that specially crafted Ruby code can still evade such `cache`-call detection: for example, a user might have its own method which itself calls the Rails `cache` helper. In such a case, the template's code doesn't start with a literal `cache` string and therefore will not be eligible for collection caching.
* Raise an ArgumentError when `include_blank` is false for a required field inGrey Baker2015-06-081-0/+5
| | | | | | | | | | `Tags::Base#select_content_tag`. Previously, passing a falsey value to `include_blank` would be ignored if the field was required, and a blank line would still be inserted. The following will now raise instead of quietly failing: `select("post", "category", %w(a required field), { include_blank: false }, required: 'required')`
* Pass over CHANGELOGS [ci skip]Prathamesh Sonpatki2015-05-161-2/+3
|
* Do not put partial name to local_assigns when rendering without an objectHenrik Nygren2015-05-141-0/+4
| | | | | | | | When one rendered a partial template without specifying an object or a collection (e.g. <%= render partial: 'partial_name' %>), Rails would make an object called :partial_name available in local_assigns. I don't think this was the intended behavior, since no local variable called 'partial_name' gets defined in the view.
* Remove :rescue_format option for translate helper since it's no longer ↵Bernard Potocki2015-05-041-0/+5
| | | | supported by I18n.
* Handle raise flag in translate when both main and default translation is ↵Bernard Potocki2015-05-041-0/+7
| | | | missing. Fixes #19967
* Revert "Merge pull request #19844 from ↵Yves Senn2015-05-011-4/+0
| | | | | | | | | | | | | | | | | | | | | stevenspiel/link_to_if_block_helper_addition" This reverts commit d459b001b43d25053e7982e96eb8383538a6e358, reversing changes made to 4d4950fae9e2a6970b5f1793aadc56a0b44e28a3. :sweat: The block is not supposed to be passed to `link_to`. It's used for a customized behavior of the `condtion = false` case. The docs illustrate that like so: ``` <%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user }) end %> ```
* Merge pull request #19844 from stevenspiel/link_to_if_block_helper_additionYves Senn2015-05-011-0/+4
|\ | | | | | | Update url_helper.rb
* | pass over CHANGELOGs. [ci skip]Yves Senn2015-04-221-2/+1
|/
* Override default form builder for a controllerKevin McPhillips2015-04-131-0/+5
|
* Accept lambda as child_index option in #fields_for methodKarol Galanciak2015-04-051-0/+4
|
* Merge pull request #19649 from aprescott/allow-array-defaultsMatthew Draper2015-04-051-0/+6
|\ | | | | | | Allow an array to be a default translation value.
| * Allow an array to be a default translation value.Adam Prescott2015-04-041-0/+8
|/ | | | | | | | | | | 4.2.1 introduced a change to the way `translate`/`t` works with an option of `default: [[]]`. In 4.2.0, this would give a default value of `[]`, but in 4.2.1, it leads to a missing translation. `default: [[]]` is again allowed for cases where a default of `[]` is needed. This addresses GitHub issue 19640.
* Merge pull request #19421 from jcoyne/translate_defaults_with_nilRafael Mendonça França2015-03-201-0/+8
| | | | Strip nils out of default translations. Fixes #19419
* put the changelog entry in the right file :sweat: [ci skip]Yves Senn2015-03-061-0/+7
|
* Fix regression when passing a value different of String.Ulisses Almeida2015-02-261-0/+5
| | | | | | | | | | | | | | | | | The previous version of rails(4.2.0) you can pass objects to the default option of translation helper. For example: ```ruby t('foo', default: 1) ``` But on rails 4.2.1 version this kind of use stopped to work, because started only to accept String types. Now with this fix we can use orther value types on this helper again.
* [ci skip] Add changelog entry for #18948.Kasper Timm Hansen2015-02-261-0/+20
|
* Fix dependency tracker bugJuho Leinonen2015-02-251-0/+5
|
* Remove RecordTagHelper, add extraction noticesTodd Bealmear2015-02-161-0/+5
| | | | | | | Per DHH in #18337, ActionView::Helpers::RecordTagHelper has been extracted to an external gem (source currently lives at todd/record_tag_helper). Removal notices have also been added for anyone upgrading that use the extracted methods.
* Merge pull request #18949 from craftsmen/image_tag_sizeYves Senn2015-02-161-0/+6
|\ | | | | | | Allow to pass a string value to size option in `image_tag` and `video_tag`
| * Allow to pass a string value to size option in `image_tag` and `video_tag`Mehdi Lahmam2015-02-161-0/+6
|/ | | | This makes the behavior more consistent with `width` or `height` options
* Partial template name does no more have to be a valid Ruby identifierAkira Matsuda2015-02-061-0/+10
| | | | because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
* Use option url: false to allow entries without a link tagDaniel Gomez de Souza2015-01-161-0/+3
|
* Fix typo in ActionView CHANGELOG [ci skip]Prathamesh Sonpatki2015-01-141-1/+1
|
* Change the default template handler from `ERB` to `Raw`.Rafael Mendonça França2015-01-041-0/+7
| | | | | Files without a template handler in their extension will be rended using the raw handler instead of ERB.
* Remove deprecated `AbstractController::Base::parent_prefixes`Rafael Mendonça França2015-01-041-0/+4
|
* Fix a few typos [ci skip]Robin Dupret2015-01-031-1/+1
|
* Unsafe default translations should not be marked html_safeJustin Coyne2015-01-021-0/+5
| | | | | | Previously default translation keys that didn't end in `_html`, but came after a missing key that ended in `_html` were being returned as html_safe. Now they are not. Fixes #18257
* Merge pull request #17974 from killthekitten/fix-render-blockRafael Mendonça França2015-01-021-0/+4
|\ | | | | | | | | | | | | Make possible to use blocks with short version of render partial Conflicts: actionview/CHANGELOG.md
| * Make possible to use blocks with short version of render partialNikolay Shebanov2014-12-191-0/+4
| |
* | Merge pull request #17973 from maurogeorge/file_field_hidden_fieldRafael Mendonça França2015-01-021-0/+6
|\ \ | | | | | | | | | Generate a hidden_tag when using a file_field
| * | Add a hidden_field on the file_fieldMauro George2015-01-021-0/+6
|/ / | | | | | | | | This will avoid a error be raised when the only input on the form is the `file_field`.
* | Changelog edits [ci skip]Robin Dupret2014-12-311-2/+2
| |
* | fix error message of option as with invalid charters in partial renderingAngelo capilleri2014-12-291-0/+5
|/ | | | | before this PR IDENTIFIER_ERROR_MESSAGE could lead to misunderstand the convention of partial name. Added OPTION_AS_ERROR_MESSAGE for unvalid charter in as option.
* Revert "Re-enable capture'ing non-String values"Santiago Pastorino2014-12-151-7/+0
| | | | This reverts commit c2fe0938d7201d4ce0bb2f25e72bf5f70df128af.
* Re-enable capture'ing non-String valuesCarsten Zimmermann2014-12-141-0/+7
| | | | | | | This has been discussed in #17661 and partially reverts the changes made in 9de83050d3a4b260d4aeb5d09ec4eb64f913ba64 and 986cac73e3c56b3dfa22fd1464f6913e38d32cc3 The test case added to content_for acts as a regression / acceptance test.
* Start Rails 5 development :tada:Rafael Mendonça França2014-11-281-218/+1
| | | | | | | We will support only Ruby >= 2.1. But right now we don't accept pull requests with syntax changes to drop support to Ruby 1.9.
* Local vars should exist in partials for falsy `:object:` values tooAgis-2014-11-251-0/+7
| | | | | | | | | | | | c67005f221f102fe2caca231027d9b11cf630484 made the local var in partials available only if what passed to `:object` was truthy. For example this would not make the local variable `foo` available inside the partial: render partial: 'foo', object: false Fixes #17373.
* Add `:enforce_utf8` option to form_forclaudiob2014-11-201-0/+7
| | | | | | | | | Since 06388b0 `form_tag` accepts the option `enforce_utf8` which, when set to false, prevents the hidden "UTF8 enforcer" field from appearing in the output. This commit implements the same behavior for `form_for`. Stems from https://github.com/rails/rails/pull/17685#issuecomment-63871395
* Some valid block calls in templates caused syntax errorsAkira Matsuda2014-11-201-0/+5
| | | | Now ActionView accepts <%= foo(){ %> and <%= foo()do %> :golf:
* Add CHANGELOG entry for #17064Rafael Mendonça França2014-10-251-0/+6
|