Commit Graph

112 Commits

Author SHA1 Message Date
Daniel Gomez de Souza
6ba4c6d497 Use option url: false to allow entries without a link tag 2015-01-16 16:28:54 -02:00
Prathamesh Sonpatki
6ff026a1cd Fix typo in ActionView CHANGELOG [ci skip] 2015-01-14 16:34:09 +05:30
Rafael Mendonça França
4be859f0fd Change the default template handler from ERB to Raw.
Files without a template handler in their extension will be rended
using the raw handler instead of ERB.
2015-01-04 11:58:42 -03:00
Rafael Mendonça França
34bcbcf357 Remove deprecated AbstractController::Base::parent_prefixes 2015-01-04 11:58:42 -03:00
Robin Dupret
9b9ec0ded4 Fix a few typos [ci skip] 2015-01-03 16:36:33 +01:00
Justin Coyne
fab50c130b Unsafe default translations should not be marked html_safe
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
2015-01-02 17:07:01 -06:00
Rafael Mendonça França
873870df4c Merge pull request #17974 from killthekitten/fix-render-block
Make possible to use blocks with short version of render partial

Conflicts:
	actionview/CHANGELOG.md
2015-01-02 14:12:23 -03:00
Rafael Mendonça França
c455817804 Merge pull request #17973 from maurogeorge/file_field_hidden_field
Generate a hidden_tag when using a file_field
2015-01-02 13:57:33 -03:00
Mauro George
00b26532f0 Add a hidden_field on the file_field
This will avoid a error be raised when the only input on the form is the
`file_field`.
2015-01-02 12:15:03 -02:00
Robin Dupret
ae08bef428 Changelog edits [ci skip] 2014-12-31 17:35:41 +01:00
Angelo capilleri
c85fed05c5 fix error message of option as with invalid charters in partial rendering
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.
2014-12-29 20:59:57 -03:00
Nikolay Shebanov
f02a35b86e Make possible to use blocks with short version of render partial 2014-12-19 13:52:12 +01:00
Santiago Pastorino
e4627edf87 Revert "Re-enable capture'ing non-String values"
This reverts commit c2fe0938d7201d4ce0bb2f25e72bf5f70df128af.
2014-12-15 21:20:54 -02:00
Carsten Zimmermann
c2fe0938d7 Re-enable capture'ing non-String values
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.
2014-12-14 10:57:43 +01:00
Rafael Mendonça França
f25ad07f5a Start Rails 5 development 🎉
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.
2014-11-28 15:00:06 -02:00
Agis-
8f7434adba 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.
2014-11-25 22:26:42 +02:00
claudiob
b0cc858dd7 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
2014-11-20 12:46:30 -08:00
Akira Matsuda
7839e27b4e Some valid block calls in templates caused syntax errors
Now ActionView accepts <%= foo(){ %> and <%= foo()do %> 
2014-11-20 07:21:50 +09:00
Rafael Mendonça França
450743cf56 Add CHANGELOG entry for #17064 2014-10-25 16:20:44 -07:00
Godfrey Chan
b5571b3ccf Revert "Revert "Merge pull request #16888 from jejacks0n/render_template""
This reverts commit 585e75696b31395aee895e5366e331c07c3f5ee1.
2014-09-26 01:42:18 +09:00
Godfrey Chan
585e75696b Revert "Merge pull request #16888 from jejacks0n/render_template"
This reverts commit 07635a74b5ee08dcba3f6617def6230d8f114fe5, reversing
changes made to 1b5f61a025b6ce1ee52b7148e3ed2a9acbde28b9.

Reason: it's not ready 💣, see https://github.com/rails/rails/pull/16888#issuecomment-56400816
2014-09-23 02:06:08 +09:00
Godfrey Chan
b04ac976d9 CHANGELOG for 07635a7 2014-09-23 00:48:06 +09:00
Akshay Vishnoi
8841f45129 [ci skip] ActionView and ActionMailer CHANGELOG docs fixes 2014-09-18 03:40:51 +05:30
PaoMar
ee61b76a81 Add support for ARIA attributes in tags 2014-09-03 16:14:21 -05:00
Yves Senn
20e7f08ecc minor changelog formatting changes. 2014-08-27 12:09:21 +02:00
Alex Robbin
ce8e4a43b3 provide a builder for form labels to customize wrapping around I18n content 2014-08-20 09:59:28 -04:00
Alex Robbin
8b02832500 add I18n support for :placeholder HTML option is passed to form fields 2014-08-12 23:11:43 -04:00
David Heinemeier Hansson
da1b8a786c Fix that render layout should also be picked up by the template dependency tracker, but only half-ways. You can add that layout option on the same render call, and both templates should be added to the dependency tree. But thats going to require a more serious rework of the tracker. Please do help fix this part of it too. For now, render layout needs to be on its own line. 2014-07-25 16:37:18 -07:00
Rafael Mendonça França
03d77504be Add CHANGELOG entry for PartialIteration.
Closes #7698.
2014-07-16 14:54:23 -03:00
Jolyon Pawlyn
d005777469 Return an absolute instead of relative path from an asset url in the case of the asset_host proc returning nil 2014-07-15 08:32:55 +01:00
Godfrey Chan
00aae7cb38 Synced 4.2 release notes with the latest commits.
Also reordered some of the items to put newer ones on top (same order as
CHANGELOGs), which makes it easier to diff while we are still working on it.
2014-07-11 02:16:57 -07:00
Godfrey Chan
f2fc31473f Add CHANGELOG for c803b90 2014-07-02 15:55:28 -07:00
Rafael Mendonça França
41a7c443a6 Add CHANGELOG entry for #15214
Closes #15214
2014-06-30 17:42:56 -03:00
Lucas Mazza
9f27e1076a 'TextHelper#highlight' now accepts a block to highlight the matched words.
The helper will yield each matched word, and you can use this instead of the
':highlighter' option for more complex replacing logic:

  highlight('My email is me@work.com', EMAIL_REGEXP) { |m| mail_to(m) }
  # => 'My email is <a href="mailto:me@work.com">me@work.com</a>'
2014-06-19 15:22:23 -03:00
Matthew Draper
6857415187 Merge pull request #15654 from pdg137/master
In tag helper, honor html_safe on arrays; also make safe_join more similar to Array.join
2014-06-13 08:52:44 +09:30
Yves Senn
8f247871bb Merge pull request #15590 from zuhao/refactor_actionview_register_template_handler
Add unregister_template_handler to prevent leaks.

Conflicts:
	actionview/CHANGELOG.md
2014-06-12 14:06:59 +02:00
Zuhao Wan
a1dbb4e7e0 Add unregister_template_handler to prevent leaks. 2014-06-12 18:49:40 +08:00
Jiri Pospisil
f62ec6cb2d Fix cache_digest rake tasks
Bring cache_digests:* rake tasks up-to-date with the API changes introduced in
637bb726cac60aaa1f7e482836458aa73e17fbb7
2014-06-10 13:52:36 +02:00
Rafael Mendonça França
3acf28773b Merge pull request #15021 from hubertlepicki/allow_custom_host_in_asset_url
Allow custom asset host to be passed in asset_url
2014-05-16 13:31:20 -03:00
Yves Senn
8109dc8067 formatting pass through CHANGELOGS. [ci skip] 2014-05-16 09:03:26 +02:00
Rafael Mendonça França
05edaa660e Improve CHANGELOG entry 2014-05-14 13:40:54 -03:00
Nick Sutterer
b8ad4b5473 deprecate AbC:Base::parent_prefixes.
rename ::_local_prefixes to ::local_prefixes to state the public attribute.
document the latter.
make ::local_prefixes private, test overriding it and remove documentation for overriding ::_parent_prefixes.
2014-05-13 08:25:24 +10:00
Hubert Łępicki
db9a5c5a1f Improve documentation for asset_url
Updated CHANGELOG.md with entry about :host in asset_url
2014-05-08 20:51:59 +02:00
Joshua Cody
d5f2c5c20e Include label value in i18n attribute lookup
Previously, only the object and method name from the label tag were
used when looking up the translation for a label. If a value is
given for the label, this ought to be additionally used. 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".
2014-05-06 14:37:28 -05:00
Robin Dupret
5c87c95a71 Enhance a bit a few changelog entries [ci skip] 2014-05-02 11:56:03 +02:00
phoet
b6aa70c3b5 always use File.join 2014-05-01 16:09:17 -04:00
glorieux
c8b7ad1cc5 Change favicon_link_tag helper mimetype from image/vnd.microsoft.icon to image/x-icon.
Although the official IANA-registered MIME type for ICO files is image/vnd.microsoft.icon,
registered in 2003, it was submitted to IANA by a third party and is not recognized by Microsoft products.
The MIME type image/x-icon should be used since is the one recognized by the major browsers on the market.
2014-04-21 14:28:04 +02:00
Rafael Mendonça França
cbb917455f Merge pull request #14738 from tilsammans/pull/11407
Remove wrapping div with inline styles for hidden form fields.

Conflicts:
	actionview/CHANGELOG.md
2014-04-17 15:29:37 -03:00
Joost Baaij
89ff1f82f0 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 absense of
inline styles help in validating for Content Security Policy.
2014-04-14 19:45:12 +02:00
Vasiliy Ermolovich
3964bbc490 collection_check_boxes respects :index option for the hidden filed name.
closes #14147
2014-04-14 17:13:43 +03:00