| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
double limits
|
|\
| |
| |
| |
| |
| |
| | |
Fix how to compute class name on habtm namespaced.
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| |
| | |
Thank's for @laurocaetano for the help with tests. :smiley:
Fixes #14709
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Make filter_binds filter out symbols that are equal to strings
Conflicts:
activerecord/CHANGELOG.md
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveRecord::Relation::Merger's filter_binds method does not filter out bind
variables when one of the attribute nodes has a string name, but the other has
a symbol name, even when those names are actually equal.
This can result in there being more bind variables than placeholders in the
generated SQL. This is particularly an issue for PostgreSQL, where this is
treated as an error.
This patch changes the filter_binds method to make it convert both attribute
names to strings before comparing.
|
|/
|
|
| |
[Brad Bennett, Jessica Yao, & Lakshmi Parthasarathy]
|
| |
|
|
|
|
| |
Closes #10802.
|
|
|
|
| |
Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In #10410 it was noted that you can no longer create PK's with the
type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly
because the newer adapter is checking for column type with the
id column instead of just letting it pass through like it did
before.
Side effects:
You may just create a PK column of a type that you really don't
want to be your PK. As far as I can tell this was allowed in 3.2.X
and perhaps an exception should be raised if you try and do
something extremely dumb.
|
|
|
|
|
|
|
| |
Closes #15024.
These operations happen before instances are created.
The current behavior is misleading and can result in broken behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rollback"
We are reverting these commits, because there are other caveats related
to dirty attributes not being restored when a transaction is rollback.
For instance, nested transactions cannot proper restore the dirty
attributes state after a rollback.
At the moment, the dirty attributes are scoped by the transaction.
When we call `.save` on a record, the dirty attributes will be reset even
if the transaction gets rollback.
[related #13166]
[related #15018]
[related #15016]
[closes #15019]
This reverts commits
* bab48f0a3d53a08bc23ea0887219e8deb963c3d9
* b0fa7cf3ff8432cc2eef3682b34763b7f8c93cc8.
* 73fb39b6faa9de593ae75ad4e3b8e065ea0e53af
* 37c238927fbed059de3f26a90d8923fb377568a5.
* 8d8d4f1560264cd1c74364d67fa0501f6dd2c4fa
Revert "Merge pull request #13166 from bogdan/transaction-magic"
|
|
|
|
|
| |
HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded.
This addresses both #14913 and #14914 for master.
|
|
|
|
| |
Closes #14989
|
|
|
|
| |
[related #13166]
|
|
|
|
|
| |
This makes table_name_suffix work the same as table_name_prefix when
using namespaced models. Pretty much the same as 67d1cec.
|
| |
|
|
|
|
|
|
|
|
| |
This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel#SelectManager.
In 4.0 series it is delegated to Array#join
This patch puts back the behaviour of 4.0
|
|\
| |
| |
| |
| |
| |
| | |
Fix exception when logging SQL w/ nil binary value.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
|\ \
| |/
|/|
| | |
Fixed custom validation context bug for child associations
|
| |
| |
| |
| |
| |
| |
| |
| | |
associations were not being saved.
Fixes #13854.
[Eric Chahin, Aaron Nelson, & Kevin Casey]
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Symbolize variables of mysql/mysql2 connection configuration
Conflicts:
activerecord/CHANGELOG.md
|
| |/
| |
| |
| |
| |
| |
| | |
For mysql2/mysql adapters, `sql_mode` variable name set in `database.yml`
as string, was ignored and `sql_mode` was set to use strict mode.
Fixes #14895
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
SQLite3: Always close statements.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | | |
SQLite3 adapter must make sure to close statements after queries.
Fixes: #13631
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
When used a custom join_table name on a habtm, rails was not saving it
on Reflections. This causes a problem when rails loads fixtures, because
it uses the reflections to set database with fixtures.
|
| |
| |
| |
| | |
/cc @tenderlove
|
| |
| |
| |
| |
| |
| |
| | |
The PG Adapter should use `:datetime` consistently instead of mapping
mispellings to `:timestamp`.
See #14513
|
| |
| |
| |
| |
| |
| | |
transactions.
Closes #14841.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properly handle scoping with has_many :through. Fixes #14537.
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/cases/associations/has_many_through_associations_test.rb
|
| | |
| | |
| | |
| | | |
details).
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also add a Changelog entry
[related #9702]
[fixes #8928]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
properly return an empty hash instead of zero. Fixes issue #14721
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #14222.
This is a follow up to #6104
This does not have the backwards compatibility issues brought up in
implementation to break.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
laurocaetano/equality_between_relation_and_collection_proxy
The comparison between `Relation` and `CollectionProxy` should be consistent.
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Example:
author.posts == Post.where(author_id: author.id)
# => true
Post.where(author_id: author.id) == author.posts
# => true
Fixes #13506
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
swoker/activerecord_fix_aggregate_methods_with_select
Activerecord fix aggregate methods with select
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
[Yves Senn & Matthew Draper]
|
| | | |
| | | |
| | | |
| | | | |
[Yves Senn & Matthew Draper]
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix insertion of records for hmt association with scope
Conflicts:
activerecord/CHANGELOG.md
|