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
Yves Senn
7b75551a1a
Merge pull request #18949 from craftsmen/image_tag_size
...
Allow to pass a string value to size option in `image_tag` and `video_tag`
2015-02-16 13:20:23 +01: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
yuuji.yaginuma
37b36a48b9
use kwargs instead of xhr method. refs #18771 .
2015-02-07 09:12:20 +09: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
0caac9bf9b
Add tests to make sure label and placeholder respect to_model
2015-02-05 16:19:29 -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
Vipul A M
dd6b0c2a3d
Fixed test for deprecation warning in actionview, renaming from baf14ae513
2015-01-31 21:54:33 +05:30
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
Yuki Nishijima
08eafc9646
Eliminate a ruby warning in a test in Action View
...
This eliminates the warning below:
actionview/test/template/form_helper_test.rb:913: warning: method redefined; discarding old id_came_from_user?
actionview/test/template/form_helper_test.rb:104: warning: previous definition of id_came_from_user? was here
2015-01-17 09:44:31 -08:00
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
b67990cf34
Add tests with an explanation of why we're using _before_type_cast
...
If you entered incorrect input into a form (particularly with a
numericality validation), we should not replace what you typed in with
`0`, since clicking submit a second time would essentially be the same
as erroneously accepting the junk input as 0.
2015-01-14 16:46:04 -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
Prathamesh Sonpatki
6ff026a1cd
Fix typo in ActionView CHANGELOG [ci skip]
2015-01-14 16:34:09 +05:30
Kuldeep Aggarwal
90aef23e38
No need of requiring rbconfig
, it is by-default loaded
2015-01-10 20:27:18 +05:30
Rafael Mendonça França
1c8192669f
Avoid changing the global state on the tests
2015-01-05 14:39:52 -03: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
9644cdcd3d
Merge pull request #18328 from brainopia/remove_tz_proxy
...
Use directly TZInfo::Timezone without proxy
2015-01-04 18:42:40 -03:00
Rafael Mendonça França
2bf8b5b6ec
Remove wrong TODO comment
2015-01-04 15:54:22 -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
brainopia
ab4c900656
Use directly TZInfo::Timezone without proxy
...
Since real timezone is loaded anyway in `#utc_offset`
which is called during `#create`
2015-01-04 20:08:18 +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