From 7839e27b4e467b5cf94e83555b9b6f0a4f6aaf8a Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 20 Nov 2014 06:57:22 +0900 Subject: Some valid block calls in templates caused syntax errors Now ActionView accepts <%= foo(){ %> and <%= foo()do %> :golf: --- actionview/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionview/CHANGELOG.md') diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index e388e6ecd3..d7875def51 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,8 @@ +* Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded + as Ruby block calls. + + * Akira Matsuda * + * Update `select_tag` to work correctly with `:include_blank` option passing a string. Fixes #16483. -- cgit v1.2.3 From b0cc858dd71576011c6f2a3995457c070d8b55d5 Mon Sep 17 00:00:00 2001 From: claudiob Date: Fri, 26 Sep 2014 20:11:39 -0700 Subject: Add `:enforce_utf8` option to form_for 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 --- actionview/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionview/CHANGELOG.md') diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index d7875def51..6b7adbe4a3 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,10 @@ +* Add support for `:enforce_utf8` option in `form_for`. + + This is the same option that was added in 06388b0 to `form_tag` and allows + users to skip the insertion of the UTF8 enforcer tag in a form. + + * claudiob * + * Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded as Ruby block calls. -- cgit v1.2.3 From 8f7434adba492bfa52463d1eeeaf7d5cb16288f6 Mon Sep 17 00:00:00 2001 From: Agis- Date: Tue, 28 Oct 2014 23:18:58 +0200 Subject: Local vars should exist in partials for falsy `:object:` values too 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. --- actionview/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionview/CHANGELOG.md') diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index 6b7adbe4a3..de65543137 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,10 @@ +* Local variable in a partial is now available even if a falsy value is + passed to `:object` when rendering a partial. + + Fixes #17373. + + *Agis Anastasopoulos* + * Add support for `:enforce_utf8` option in `form_for`. This is the same option that was added in 06388b0 to `form_tag` and allows -- cgit v1.2.3 From f25ad07f5ade46eb978fa82658463232d0247c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 28 Nov 2014 15:00:06 -0200 Subject: Start Rails 5 development :tada: 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. --- actionview/CHANGELOG.md | 219 +----------------------------------------------- 1 file changed, 1 insertion(+), 218 deletions(-) (limited to 'actionview/CHANGELOG.md') diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index de65543137..729717608f 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,218 +1 @@ -* Local variable in a partial is now available even if a falsy value is - passed to `:object` when rendering a partial. - - Fixes #17373. - - *Agis Anastasopoulos* - -* Add support for `:enforce_utf8` option in `form_for`. - - This is the same option that was added in 06388b0 to `form_tag` and allows - users to skip the insertion of the UTF8 enforcer tag in a form. - - * claudiob * - -* Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded - as Ruby block calls. - - * Akira Matsuda * - -* Update `select_tag` to work correctly with `:include_blank` option passing a string. - - Fixes #16483. - - *Frank Groeneveld* - -* Changed the meaning of `render "foo/bar"`. - - Previously, calling `render "foo/bar"` in a controller action is equivalent - to `render file: "foo/bar"`. In Rails 4.2, this has been changed to mean - `render template: "foo/bar"` instead. If you need to render a file, please - change your code to use the explicit form (`render file: "foo/bar"`) instead. - - *Jeremy Jackson* - -* Add support for ARIA attributes in tags. - - Example: - - <%= f.text_field :name, aria: { required: "true", hidden: "false" } %> - - now generates: - - - - *Paola Garcia Casadiego* - -* Provide a `builder` object when using the `label` form helper in block form. - - The new `builder` object responds to `translation`, allowing I18n fallback support - when you want to customize how a particular label is presented. - - *Alex Robbin* - -* Add I18n support for input/textarea placeholder text. - - Placeholder I18n follows the same convention as `label` I18n. - - *Alex Robbin* - -* Fix that render layout: 'messages/layout' should also be added to the dependency tracker tree. - - *DHH* - -* Add `PartialIteration` object used when rendering collections. - - The iteration object is available as the local variable - `#{template_name}_iteration` when rendering partials with collections. - - It gives access to the `size` of the collection being iterated over, - the current `index` and two convenience methods `first?` and `last?`. - - *Joel Junström*, *Lucas Uyezu* - -* Return an absolute instead of relative path from an asset url in the case - of the `asset_host` proc returning nil. - - *Jolyon Pawlyn* - -* Fix `html_escape_once` to properly handle hex escape sequences (e.g. ᨫ). - - *John F. Douthat* - -* Added String support for min and max properties for date field helpers. - - *Todd Bealmear* - -* The `highlight` helper now accepts a block to be used instead of the `highlighter` - option. - - *Lucas Mazza* - -* The `except` and `highlight` helpers now accept regular expressions. - - *Jan Szumiec* - -* Flatten the array parameter in `safe_join`, so it behaves consistently with - `Array#join`. - - *Paul Grayson* - -* Honor `html_safe` on array elements in tag values, as we do for plain string - values. - - *Paul Grayson* - -* Add `ActionView::Template::Handler.unregister_template_handler`. - - It performs the opposite of `ActionView::Template::Handler.register_template_handler`. - - *Zuhao Wan* - -* Bring `cache_digest` rake tasks up-to-date with the latest API changes. - - *Jiri Pospisil* - -* Allow custom `:host` option to be passed to `asset_url` helper that - overwrites `config.action_controller.asset_host` for particular asset. - - *Hubert Łępicki* - -* Deprecate `AbstractController::Base.parent_prefixes`. - Override `AbstractController::Base.local_prefixes` when you want to change - where to find views. - - *Nick Sutterer* - -* Take label values into account when doing I18n lookups for model attributes. - - The following: - - # form.html.erb - <%= form_for @post do |f| %> - <%= f.label :type, value: "long" %> - <% end %> - - # en.yml - en: - activerecord: - attributes: - post/long: "Long-form Post" - - Used to simply return "long", but now it will return "Long-form - Post". - - *Joshua Cody* - -* Change `asset_path` to use File.join to create proper paths: - - Before: - - https://some.host.com//assets/some.js - - After: - - https://some.host.com/assets/some.js - - *Peter Schröder* - -* Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to - `image/x-icon`. - - Before: - - # => favicon_link_tag 'myicon.ico' - - - After: - - # => favicon_link_tag 'myicon.ico' - - - *Geoffroy Lorieux* - -* Remove wrapping div with inline styles for hidden form fields. - - We are dropping HTML 4.01 and XHTML strict compliance since input tags directly - inside a form are valid HTML5, and the absence of inline styles help in validating - for Content Security Policy. - - *Joost Baaij* - -* `collection_check_boxes` respects `:index` option for the hidden field name. - - Fixes #14147. - - *Vasiliy Ermolovich* - -* `date_select` helper with option `with_css_classes: true` does not overwrite other classes. - - *Izumi Wong-Horiuchi* - -* `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY` - as input. - - Fixes #14405. - - *Yves Senn* - -* Add `include_hidden` option to `collection_check_boxes` helper. - - *Vasiliy Ermolovich* - -* Fixed a problem where the default options for the `button_tag` helper are not - applied correctly. - - Fixes #14254. - - *Sergey Prikhodko* - -* Take variants into account when calculating template digests in ActionView::Digestor. - - The arguments to ActionView::Digestor#digest are now being passed as a hash - to support variants and allow more flexibility in the future. The support for - regular (required) arguments is deprecated and will be removed in Rails 5.0 or later. - - *Piotr Chmolowski, Łukasz Strzałkowski* - -Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes. +Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionview/CHANGELOG.md) for previous changes. -- cgit v1.2.3