Kuldeep Aggarwal
b341778485
[ci skip] correct output of select
2015-03-13 08:41:36 +05:30
Akshay Vishnoi
58ebd15abb
[CI SKIP] Correct output of options_for_select
2015-03-13 02:19:04 +05:30
Kasper Timm Hansen
37695b8aab
Let strip_tags leave HTML escaping to Rails.
...
Prevents double escaping errors, such as "&" becoming "&".
2015-03-10 20:04:01 +01:00
Aaron Patterson
5eaeb37080
don't need to rescue Exception in this case
2015-03-05 15:19:44 -08:00
Anton Davydov
3f8ec7898b
[ci skip] Delete excess white in documentation
2015-03-05 23:25:47 +03:00
Anton Davydov
4327feba28
[ci skip] Add information about sanitize option in TextHelper#highlight
2015-03-05 20:51:48 +03:00
Rafael Mendonça França
ecf078f0a4
Merge pull request #19144 from y-yagi/fix_streaming_buffer
...
fix ActionView::Template::Error when using Streaming with capture.
2015-03-04 17:24:46 -03:00
Yu Haidong
d4f2c3adb3
Fix spelling [ci skip]
2015-03-04 21:54:54 +08:00
Aaron Patterson
cad20f720c
move _generate_paths_by_default to where it is used
...
_generate_paths_by_default wasn't used in AD::Routing::UrlFor, so we
should be able to move it where it is used in AV::Routing
2015-03-01 13:35:24 -08:00
yuuji.yaginuma
35d12ef3f1
fix ActionView::Template::Error when using Streaming with capture.
...
can't acquire a encoding from StreamingBuffer. fixes #12001
2015-03-01 16:20:27 +09:00
Ulisses Almeida
362557eb41
Fix regression when passing a value different of String.
...
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.
2015-02-26 19:04:00 -03:00
Yu Haidong
dda17ccc62
Fix typos in ActionView::Helpers::FormBuilder comment [ci skip]
2015-02-26 15:29:04 +08:00
Rafael Mendonça França
d6c34ce59f
Merge pull request #19074 from Mession/fix_test_dependency_of_erb_template_partial_with_layout
...
Fix dependency tracker bug
2015-02-25 12:03:25 -03:00
Rafael Mendonça França
68a2a67116
Merge pull request #18948 from kaspth/automatic-collection-caching
...
Merge multi_fetch_fragments.
2015-02-25 11:54:07 -03:00
Juho Leinonen
4640c346ea
Fix dependency tracker bug
2015-02-25 14:57:29 +02:00
Kasper Timm Hansen
11644fd0ce
Collections automatically cache and fetch partials.
...
Collections can take advantage of `multi_read` if they render one template
and their partials begin with a cache call.
The cache call must correspond to either what the collections elements are
rendered as, or match the inferred name of the partial.
So with a notifications/_notification.html.erb template like:
```ruby
<% cache notification %>
<%# ... %>
<% end %>
```
A collection would be able to use `multi_read` if rendered like:
```ruby
<%= render @notifications %>
<%= render partial: 'notifications/notification', collection: @notifications, as: :notification %>
```
2015-02-21 16:06:57 +01:00
Rafael Mendonça França
14a6e17928
Merge pull request #17069 from modosc/master
...
move cache_digests rake methods into their own namespace
2015-02-20 20:31:48 -02:00
Kasper Timm Hansen
e56c635427
Merge multi_fetch_fragments.
...
Makes caching a collection of template partials faster using `read_multi`
on the Rails cache store.
Some caching implementations have optimized `read_multi` so we don't have
to check in the cache store for every template.
2015-02-20 20:07:50 +01:00
Anthony Dmitriyev
421865e4fd
Fix cache_helper comment ERB
2015-02-20 17:04:35 +00:00
Rafael Mendonça França
063b058e28
Merge pull request #17143 from kuldeepaggarwal/fix-mailTo
...
mail_to helper method fix
2015-02-20 14:58:51 -02:00
Rafael Mendonça França
af5b245065
Use a name that better reflect the return value
2015-02-20 14:24:18 -02:00
Rafael Mendonça França
725d5c85fc
Merge pull request #17138 from jpcody/rename_default_form_builder
...
Rename default_form_builder to avoid collision
2015-02-20 14:23:30 -02:00
Leandro Nunes
8e02dcdf4e
Corrects the API to method select_tag
...
The 'selected' option is not doing what it should do.
The expected behavior is to pass the value selected by default for the options_from_collection_for_select method
2015-02-20 12:01:46 -02:00
Rafael Mendonça França
4ffe46f5fe
Merge pull request #18411 from todd/extract_record_tag_helper
...
Remove RecordTagHelper
2015-02-18 19:19:48 -02:00
Rafael Mendonça França
c407693a41
Add nodoc to private constant [ci skip]
2015-02-18 17:44:57 -02:00
Rafael Mendonça França
3bd7c29ace
Merge pull request #18970 from nithinbekal/local-assigns-doc
...
Add documentation for local_assigns [ci skip]
2015-02-18 17:42:03 -02:00
Rafael Mendonça França
02b955766e
Improve documentation of local_assigns
2015-02-18 17:40:58 -02:00
Rafael Mendonça França
e07eb079bf
Merge pull request #15700 from maurogeorge/guides-local_assigns
...
Add docs about local_assigns on guides
2015-02-18 17:34:37 -02:00
Nithin Bekal
3e66017b55
Add documentation for local_assigns [ci skip]
2015-02-17 18:25:59 +05:30
Todd Bealmear
01e94ef3b1
Remove RecordTagHelper, add extraction notices
...
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.
2015-02-16 11:35:27 -08:00
Mehdi Lahmam
ab5f119ac6
Allow to pass a string value to size option in image_tag
and video_tag
...
This makes the behavior more consistent with `width` or `height` options
2015-02-16 12:58:34 +01:00
Rafael Mendonça França
c3513a13f4
Merge pull request #18845 from bogdan/remove-code-dups-in-action-view
...
Remove some code duplication in ActionView tags code
2015-02-11 17:40:36 -02:00
Bogdan Gusiev
7543717242
Remove code duplication in ActionView::Helpers::Tags::Base
2015-02-11 14:47:54 +02:00
Yuki Nishijima
6b76c2e280
Remove warning from ActionView::Helpers::Tags::Translator
...
This removes the following warning:
/GitHub/rails/actionview/lib/action_view/helpers/tags/translator.rb:19: warning: private attribute?
2015-02-08 16:00:19 -08:00
Miklos Fazekas
be0875f458
Fixed undefined method `i18n_key' for nil:NilClass for labels in non AR form_for
...
Refactoring at #18647 broke using non active record objects in form_for. This patch
restores the original behaviour where we only compute i18 key when object.respond_to?(:to_model)
2015-02-06 22:44:48 +01:00
Colin Rymer
7fb6759a84
Indicate link_to creates an anchor element
...
The `link_to` helper generates an HTML anchor element (consisting of opening and closing anchor tags and an element body). The docs currently state the a link tag is generated (which would indicate a tag like `<link>`, which is another valid HTML tag), so this change clarifies that an anchor element is actually generated.
[ci skip]
2015-02-06 12:46:38 -05:00
Rafael Mendonça França
4b4e2281a0
Rename method to make explicit its intention
...
call is too generic
2015-02-05 16:28:12 -02:00
Rafael Mendonça França
003c0cda26
Use kwags to make the argument meaning explicit
2015-02-05 16:26:16 -02:00
Rafael Mendonça França
d80996ea8d
Use new hash syntax
2015-02-05 16:21:39 -02:00
Rafael Mendonça França
44e1cda314
Change the method visibility
...
Thse methods are used only inside this class
2015-02-05 16:20:39 -02:00
Rafael Mendonça França
79100b8a3a
Only check if object respond_to to_model once
2015-02-05 15:28:25 -02:00
Rafael Mendonça França
96be4f65d0
placeholder doesn't exist inside this context
2015-02-05 15:27:27 -02:00
Rafael Mendonça França
ed85348877
Merge pull request #18647 from mcls/placeholderable-to-model
...
The `model_name` method should be called on `to_model`
2015-02-05 15:16:57 -02:00
Akira Matsuda
da9038eaa5
Partial template name does no more have to be a valid Ruby identifier
...
because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
2015-02-06 01:46:59 +09:00
Vipul A M
6eced6a1fe
Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards.
2015-02-03 20:51:40 +05:30
robertomiranda
ce8efcf296
Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
...
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
yachibit
d8bf32231e
Add missing options to datetime_select
[ci skip]
2015-01-25 14:30:03 +09:00
Maarten Claes
c946b2a300
Reduce duplication when generating translations
2015-01-22 23:02:48 +01:00
Maarten Claes
ee3dd2f0ff
Convert with to_model
before calling ActiveModel methods on object
2015-01-22 23:00:34 +01:00
Rafael Mendonça França
e36ecf4d77
Merge pull request #18546 from brainopia/action_view_render
...
A shortcut to setup controller environment
2015-01-22 12:09:32 -02:00