| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
Gaurav2728/no_more_class_methods_for_JoinDependency
no more class methods for JoinDependency [ci skip]
|
| |
| |
| | |
`ActiveRecord::Associations::JoinDependency` now it’s own class` and `ActiveRecord::Associations::ThroughAssociationScope` doesn’t exists
|
|\ \
| | |
| | | |
Updated docs for transform_keys & transform_values
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're calling this function on an empty hash as part of copying the
attribute set during dirty checking initialization. The new structure
caused a performance regression on loading records from the database.
This causes `User.all.to_a` to perform about 10% faster w/ 10k records.
Calculating -------------------------------------
User.all - master 9.000 i/100ms
User.all - sg-fix-ar-regression
8.000 i/100ms
-------------------------------------------------
User.all - master 81.236 (± 7.4%) i/s - 405.000
User.all - sg-fix-ar-regression
89.716 (± 7.8%) i/s - 448.000
|
|\ \ \
| | | |
| | | | |
Make fuzzy sentence more clear
|
|/ / /
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| |_|/
|/| | |
check if @rake_patterns is defined
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes the following warning.
```
railties/lib/rails/test_unit/minitest_plugin.rb:45: warning: instance variable @rake_patterns not initialize
```
|
|\ \ \
| | | |
| | | | |
Fix minor docs [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix `ActiveRecord::RecordNotFound` error message with custom primary …
|
| | |_|/
| |/| |
| | | |
| | | | |
skip]
|
|\ \ \ \
| |_|/ /
|/| | | |
[ci skip] Update docs of `AR::Sanitization`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* add % style prepared statement and string examples for
`sanitize_sql_for_conditions`
* add array and string examples for `sanitize_sql_for_assignment`
* add examples for `sanitize_sql_like`
* add % style prepared statement example for `sanitize_sql_array`
* align spaces of exampl code
|
|\ \ \ \
| | | | |
| | | | | |
[ci skip] Fix which method `FormHelper#date_field` try to call
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When this method was implemented
(https://github.com/rails/rails/pull/5016/files), `to_date` is called.
But this behavior was chagned refactoring
(https://github.com/rails/rails/pull/6452/files).
In the first commit, there were not test which asserts `to_date` is called.
I think trying `to_date` is more useful than trying `strftime`, because
we can write `"2015-01-01".to_date`. But first fix comments to match
actual behavior.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
minor doc fix [ci skip]
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Here `app` needed to be `get` because we're getting a route. This fixes
the typo so the test passes.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Add missing routing tests for info controller
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Vaguely related to #21605 where I proposed to remove index route since it was redirecting to the 'routes' action,
but this was kept so I thought it made sense to add some tests regarding this.
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Added test case for deprecation of Mime.const_defined? and removed use of it
|
| |/ / / / |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix proper fonts in `change_column_null` method docs. [ci skip]
|
|/ / / / |
|
|\ \ \ \
| |/ / /
|/| | | |
[ci skip] Add `Active Model` to a list of independently used modules.
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Added test cases where collection partial cached & rendered with different keys
|
| | | |
| | | |
| | | |
| | | | |
rendered for different key
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`inverse_of` on through associations was accidently removed/caused to
stop working in commit f8d2899 which was part of a refactoring on
`ThroughReflection`.
To fix we moved `inverse_of` and `check_validity_of_inverse!` to the
`AbstractReflection` so it's available to the `ThroughReflection`
without having to dup any methods. We then need to delegate `inverse_name`
method in `ThroughReflection`. `inverse_name` can't be moved to
`AbstractReflection` without moving methods that set the instance
variable `@automatic_inverse_of`.
This adds a test that ensures that `inverse_of` on a `ThroughReflection`
returns the correct class name, and the correct record for the inverse
relationship.
Fixes #21692
|
|\ \ \
| | | |
| | | | |
Fix typo in configuration test descritive > descriptive [ci skip]
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Correcting `ActiveRecord::DangerousAttributeError` error message [ci …
|
|/ / / |
|
|\ \ \
| |_|/
|/| | |
minor typo fix [ci skip]
|
|/ / |
|
|\ \
| | |
| | | |
`column_alias_for` method is no more supporting *keys [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Handle nested fields_for by adding indexes to record_name
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In case of the form with nested fields_for, i. e.
<%= form_for :foos, url: root_path do |f| %>
<% @foos.each do |foo| %>
<%= f.fields_for 'foo[]', foo do |f2| %>
<%= f2.text_field :id %>
<% foo.bars.each do |bar| %>
<%= f2.fields_for 'bar[]', bar do |b| %>
<%= b.text_field :id %>
<% end %>
<% end %>
<% end %>
<% end %>
<%= f.submit %>
<% end %>
rails doesn't add index for 'foo' in the inner fields_for block, so field names
in the outer fields_for looks like "foos[foo][#{foo_index}][id]" and in the
inner "foos[foo[]][bar][#{bar_index}][id]". Submitting of such form leads to an
error like:
>ActionController::BadRequest (Invalid request parameters: expected Array
>(got Rack::QueryParser::Params) for param `foo'):
This commit adds indexes for the foos in the inner blocks, so field names
become "foos[foo][#{foo_index}][bar][#{bar_index}][id]" and submitting of such
form works fine as expected.
Fixes #15332
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix `ActiveRecord::PredicateBuilder` docs. as `register_handler` no m…
|
|/ / /
| | |
| | |
| | | |
ClassMethod, Since commit https://github.com/rails/rails/commit/a3936bbe21f4bff8247f890cacfd0fc882921003 [ci skip]
|
|\ \ \
| | | |
| | | | |
Add job priorities to ActiveJob
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Add a hidden field on the collection_radio_buttons
|
| | | | |
| | | | |
| | | | |
| | | | | |
as string
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This will avoid a error be raised when the only input on the form is the
`collection_radio_buttons`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Added missing tests for transform_values! which returns Enumerator
|