| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
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
|
| | |_|_|/ / /
| |/| | | | |
| | | | | | |
| | | | | | | |
blocks
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Correcting `ActiveRecord::ReadOnlyRecord` Error Message [ci skip]
|
| | | | | | | | |
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Added missing tests for transform_keys! which returns Enumerator
|
| |/ / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
fix Mime type in doc since mime types via constants is deprecated [ci…
|
| |/ / / / / / |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We only want to activate flash when the user has enabled it. Api
servers don't use flash, so add an empty implementation to the base
Request object.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Committing the flash needs to happen in order for the session to be
written correctly, so lets guarantee that it actually does happen.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I'm doing this so that we can commit the flash to the session object Out
of Band of the flash middleware
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
docs, add missing closing bracket. [ci skip]
|
| |/ / / / / / |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Fixed humane -> human [ci skip]
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
[Engines Guide] Remove to_s example, since it's outside the scope
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It's outside the scope of the Engines guide
[skip ci]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The implementation of `attribute_method?` on Active Record requires
establishing a database connection and querying the schema. As a general
rule, we don't want to require database connections for any class macro,
as the class should be able to be loaded without a database (e.g. for
things like compiling assets).
Instead of eagerly defining these methods, we do it lazily the first
time they are accessed via `method_missing`. This should not cause any
performance hits, as it will only hit `method_missing` once for the
entire class.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Quote prepared statements of `sanitize_sql_array`
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Sure unquoted SQL code pass test, but this % style prepared statements
are dangerous. Test codes and code examples are also "Rails" codes,
so quote placeholder of prepared statements.
|
|\ \ \ \ \ \ \ \
| |_|_|/ / / / /
|/| | | | | | | |
Fix deprecated mime types via constants
|
|/ / / / / / /
| | | | | | |
| | | | | | | |
Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This was passing prior to 20b177b78ef5d21c8cc255f0376f6b2e948de234,
because we were not properly applying our contract that
`model.attr == model.tap(&:save).reload.attr` for this case. Now that
that has been resolved, this test is invalid on some adapters
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When a time object was assigned to a datetime column, the decorator for
TZ aware attributes wouldn't call super, so when using a database
without support for subsecond precision, the nanosecond would not be
truncated, leading to the value being marked as changed.
Interestingly, this also shows our new implementation of dirty checking
to be more robust than the old one (with less code and better
performance! :tada:!!!)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
They didn't help.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Use the Rack utility methods for functional header manipulation. This
helps to eliminate coupling on the header hash
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I want to move the header hash to the super request object in order to
consolidate behavior. We should be switching out buffering strategies
rather than header strategies since things like "mutating headers after
send" is an error in both cases (buffering vs streaming).
|