| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
When one rendered a partial template without specifying an object
or a collection (e.g. <%= render partial: 'partial_name' %>), Rails
would make an object called :partial_name available in local_assigns.
I don't think this was the intended behavior, since no local variable
called 'partial_name' gets defined in the view.
|
|\
| |
| | |
remove redundant parenthesis.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Prompted by:
https://github.com/rails/rails/commit/e38dd7bfa4360e241eadf0cf44abdf86ea33a393#commitcomment-11011496
/cc @kuldeepaggarwal
|
| |
| |
| |
| | |
supported by I18n.
|
|\ \
| | |
| | | |
Handle raise flag in translate when both main and default translation is missing.
|
| | |
| | |
| | |
| | | |
missing. Fixes #19967
|
|\ \ \
| |/ /
|/| | |
Actionview image tag size option override
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This illustrates the purpose of the block for `link_to_if` and
`link_to_unless` helper methods.
It should help to prevent further mistakes like #19844.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
stevenspiel/link_to_if_block_helper_addition"
This reverts commit d459b001b43d25053e7982e96eb8383538a6e358, reversing
changes made to 4d4950fae9e2a6970b5f1793aadc56a0b44e28a3.
:sweat:
The block is not supposed to be passed to `link_to`. It's used for a
customized behavior of the `condtion = false` case. The docs
illustrate that like so:
```
<%=
link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do
link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user })
end
%>
```
|
|\ \ \
| |_|/
|/| |
| | | |
Update url_helper.rb
|
| | | |
|
| |/
|/|
| |
| | |
This method is not in use since 479c7cacd5db58ab7200bc1de58c829a1a643278
|
|/
|
|
|
|
|
|
|
| |
Running Action View test case currently printing out this warning:
lib/mathn.rb is deprecated
This should silence the warning since we really want to require this
file in this test.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
4.2.1 introduced a change to the way `translate`/`t` works with an
option of `default: [[]]`. In 4.2.0, this would give a default value of
`[]`, but in 4.2.1, it leads to a missing translation.
`default: [[]]` is again allowed for cases where a default of `[]` is
needed.
This addresses GitHub issue 19640.
|
|
|
|
| |
Strip nils out of default translations. Fixes #19419
|
| |
|
| |
|
| |
|
|
|
|
| |
Prevents double escaping errors, such as "&" becoming "&amp;".
|
|
|
|
| |
Closes #19227.
|
|
|
|
| |
can't acquire a encoding from StreamingBuffer. fixes #12001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
Mession/fix_test_dependency_of_erb_template_partial_with_layout
Fix dependency tracker bug
|
| | |
|
|\ \
| |/
|/| |
Merge multi_fetch_fragments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 %>
```
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The testing of error messages have been implemented wrongly a few times.
This is an attempt to fix it.
For example, some of these test should have failed with the new code.
The reason they are not failling with the new string is the fact they
were not being tested beforehand.
|
|\ \
| | |
| | |
| | | |
mail_to helper method fix
|
| | |
| | |
| | |
| | |
| | | |
when mail_to generate blank options for any passed options(cc, bcc, body, subject)
then MICROSOFT OUTLOOK treats it differently and set wrong values in different options.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/|
| |
| | |
This makes the behavior more consistent with `width` or `height` options
|
| |
| |
| |
| |
| | |
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)
|
| | |
|
| |
| |
| |
| | |
because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
|
| |
| |
| |
| | |
onwards.
|
| |
| |
| |
| | |
https://github.com/rails/rails/commit/baf14ae513337cb185acf865e93dfc48f3aabf6a
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
This reverts commit 787e22bb491bd8c36db1e9734261c4ce02c5c5fd.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
tigrish/fix_custom_i18n_exception_handler_regression
Fix I18n regression introduced by #13832
|
| | |
| | |
| | |
| | | |
Previously, when the `:raise` options was set to `false`, it would get overwritten to `true`, preventing custom exception handlers to be used.
|