| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
|/ / |
|
| |
| |
| |
| | |
scope conditions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changes in old branches needed to be manually synched in CHANGELOGs of newer ones.
This has proven to be brittle, sometimes one just forgets this manual step.
With this commit we switch to CHANGELOGs per branch. When a new major version is
cut from master, the CHANGELOGs in master start being blank.
A link to the CHANGELOG of the previous branch allows anyone interested to
follow the history.
|
|\ \
| | |
| | | |
fix order dependent test in AR::BasicsTest
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This test https://github.com/rails/rails/blob/master/activerecord/test/cases/base_test.rb#L381
is failing because is not setting `CreditCard.pluralize_table_name` to `false`.
In this case, i prefer to change to another model that is not in the `GUESSED_CLASSES`
array.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure class variable is set to nil.
It prevents the following test to fail:
def test_do_not_run_the_converter_when_nil_was_set
customers(:david).non_blank_gps_location = nil
assert_nil Customer.gps_conversion_was_run
end
Check https://github.com/rails/rails/blob/master/activerecord/test/models/customer.rb#L7
for more information.
|
| |
| |
| |
| | |
serialized attribute value is not from the same class
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
We reverted the removal because the new deprecation policy
|
| | |
|
| |
| |
| |
| | |
This reverts commit 7a8aee08b610f6edbfe5be076dc14e5cdcf1355e.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit a7f4b0a1231bf3c65db2ad4066da78c3da5ffb01.
Conflicts:
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/persistence.rb
activerecord/test/cases/base_test.rb
activerecord/test/cases/dirty_test.rb
activerecord/test/cases/timestamp_test.rb
|
| | |
|
| |
| |
| |
| | |
#accepts_nested_attributes_for
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This functionality will be available from gem
`active_record-session_store` instead.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This is a cleaner version of #6916.
Closes #3165.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I've noticed a caveat with the :autosave option biting people before.
Questions arise about why they must explicitly save an associated object
in their own before_save callbacks. I've updated the documentation as
such to note to users that the :autosave callback occurs before any
user defined callbacks. They must save the associated record themselves
if altering it in their own callbacks.
Signed-off-by: David Celis <david@davidcelis.com>
|
|\ \
| | |
| | | |
AR::Relation#model would be a better API than AR::Relation#klass
|
| | | |
|
|\ \ \
| | | |
| | | | |
Improve eager load on Rails
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new option allows any Ruby namespace to be registered and set
up for eager load. We are effectively exposing the structure existing
in Rails since v3.0 for all developers in order to make their applications
thread-safe and CoW friendly.
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
associations with the same foreign key.
This closes #5200.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reason since MySQL 5.6.6-m9 the `sql_mode` default value is
`NO_ENGINE_SUBSTITUTION`.
This default parameter change is out of control from Rails.
This test verifies Rails not overriding the default `@@GLOBAL.sql_mode` value
by checking if `@@GLOBAL.sql_mode` is the same as `@@SESSION.sql_mode`.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Use each_key instead of generating intermediate keys array.
* Use each_with_object instead of inject to build hash.
* Use ternary to return instead of if + assignment.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This method was added to be shared between update_attribute and
update_column in 50725cec397d4fa0ecf1dda4e6ae845a993f1ba7, but since
update_attribute was removed, and update_column has changed to delegate
to update_columns, the method is not used anywhere anymore.
Also remove "key.to_s" conversion when raising readonly error, since
the key is being interpolated.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is a real fix (as compared to the band-aid in b127d86c), which uses
the recently-added equality methods for ARel nodes. It has the side
benefit of simplifying the merge code a bit.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
brainopia/use_inversed_parent_for_first_and_last_child
Use inversed parent for first and last child of has_many association
|
| | | | |
|