| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
Conflicts:
guides/source/4_0_release_notes.md
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
No need to merge hashes when simply setting options does the job.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous change 92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c improved
this example, but calling .create + #valid? ends up running validations
twice, and we don't want to showcase that.
Lets use the normal use case of building a new object and calling #save
on it, which is what a basic scaffold with Active Record does.
[ci skip]
|
| | |
|
| |
| |
| |
| | |
Strip nils out of default translations. Fixes #19419
|
| |
| |
| |
| |
| |
| |
| | |
Preserving RACK_ENV behavior.
This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing
changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This logic was just doing duplicated work, since the button_to helper
relies on tag/content_tag to generate the button html, which already
handles all boolean attributes it knows about.
The code dates back to 2005: 43c470fae468ef63e0d5c3dc1e202925685fd47b.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I’m renaming all instances of `use_transcational_fixtures` to
`use_transactional_tests` and “transactional fixtures” to
“transactional tests”.
I’m deprecating `use_transactional_fixtures=`. So anyone who is
explicitly setting this will get a warning telling them to use
`use_transactional_tests=` instead.
I’m maintaining backwards compatibility—both forms will work.
`use_transactional_tests` will check to see if
`use_transactional_fixtures` is set and use that, otherwise it will use
itself. But because `use_transactional_tests` is a class attribute
(created with `class_attribute`) this requires a little bit of hoop
jumping. The writer method that `class_attribute` generates defines a
new reader method that return the value being set. Which means we can’t
set the default of `true` using `use_transactional_tests=` as was done
previously because that won’t take into account anyone using
`use_transactional_fixtures`. Instead I defined the reader method
manually and it checks `use_transactional_fixtures`. If it was set then
it should be used, otherwise it should return the default, which is
`true`. If someone uses `use_transactional_tests=` then it will
overwrite the backwards-compatible method with whatever they set.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Let strip_tags leave HTML escaping to Rails.
|
| | |
| | |
| | |
| | | |
Prevents double escaping errors, such as "&" becoming "&".
|
|/ /
| |
| |
| | |
This is a follow-up to #19257
|
|\ \
| | |
| | | |
Run all our tests in random order
|
| | |
| | |
| | |
| | | |
This reverts commit 7025d7769dc53f0a3ffab8b537727ef3fee367fc.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.
Conflicts:
actionmailer/test/abstract_unit.rb
actionview/test/abstract_unit.rb
activemodel/test/cases/helper.rb
activerecord/test/cases/helper.rb
activesupport/test/abstract_unit.rb
railties/test/abstract_unit.rb
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes #19227.
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
fix ActionView::Template::Error when using Streaming with capture.
|
| |/
| |
| |
| | |
can't acquire a encoding from StreamingBuffer. fixes #12001
|
| | |
|
| |
| |
| |
| |
| | |
Since there are disparities between the raised error messages on the
different implementations, let's avoid being too accurate.
|
|/
|
|
|
| |
_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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ \
| | |
| | | |
move cache_digests rake methods into their own namespace
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
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.
|