Commit Graph

584 Commits

Author SHA1 Message Date
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
brainopia
685142e4f4 Support :assigns option when rendering with controllers/mailers. 2015-01-22 00:25:50 +03:00
T.J. Schuck
2a68b470f1 Single instead of double quotes
[ci skip]
2015-01-20 14:21:22 -05:00
T.J. Schuck
d4ec25a317 Rewrite SanitizeHelper docs 2015-01-20 14:19:44 -05:00
T.J. Schuck
4d476ff223 Fix code formatting in sanitize docs 2015-01-20 14:19:44 -05:00
yuuji.yaginuma
5c672c0710 fix typo in number_field_tag documentation [ci skip] 2015-01-19 15:19:44 +09:00
Prathamesh Sonpatki
25991b94c7 Use existing constant for joining instead of '_' 2015-01-18 13:06:42 +05:30
Prathamesh Sonpatki
b417e0b753 nodoc ActionView::ModelNaming module
- Its only used by ActionView internals and not supposed to be used
  through public API.
2015-01-18 11:57:36 +05:30
Daniel Gomez de Souza
6ba4c6d497 Use option url: false to allow entries without a link tag 2015-01-16 16:28:54 -02:00
Sean Griffin
d8e710410e Only use the _before_type_cast in the form when from user input
While we don't want to change the form input when validations fail,
blindly using `_before_type_cast` will cause the input to display the
wrong data for any type which does additional work on database values.
2015-01-14 17:08:25 -07:00
Sean Griffin
99b6cf5381 Revert "Don't use the _before_type_cast version of attributes in the form"
This reverts commit 787e22bb491bd8c36db1e9734261c4ce02c5c5fd.
2015-01-14 16:44:06 -07:00
Sean Griffin
787e22bb49 Don't use the _before_type_cast version of attributes in the form
We should never be ignoring valuable information that the types may need
to give us. The reason that it originally used `_before_type_cast` is
unclear, but appears to date back long enough that the reasons may not
be relevant today. There is only one test that asserts that it uses the
before type cast version, but it gives no context as to why and uses a
mock which does not simulate the real world.

Fixes #18523.
2015-01-14 15:42:24 -07:00
Rafael Mendonça França
d76bf34b04 Merge pull request #17676 from tigrish/fix_custom_i18n_exception_handler_regression
Fix I18n regression introduced by #13832
2015-01-05 14:35:50 -03:00
Rafael Mendonça França
dc7ed96adc Remove version conditional for find_template_paths
Now that we only support Ruby 2.2+ we don't need this conditional
anymore
2015-01-04 15:54:21 -03:00
claudiob
adfeeb01e7 Remove unneeded require 'as/deprecation'
Tests should still pass after removing `require 'active_support/deprecation'`
from these files since the related deprecations have been removed.
2015-01-04 07:45:07 -08:00
Rafael Mendonça França
bf7b8c193f Remove unneeded requires
These requires were added only to change deprecation message
2015-01-04 12:11:03 -03:00
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
Vijay Dev
4b9dba99d6 Merge branch 'master' of github.com:rails/docrails 2015-01-03 14:58:17 +00: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