| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This is reworking of rails/rails/pull/7380 made for rails 3.
|
|
|
|
|
|
| |
This is a backport of #10164, already merged into
master. The issue is described in lengthy detail
in issues #3002 and #5494.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add test to ensure preloading works as expected with "group", "select" and "includes".
Conflicts:
activerecord/test/cases/relations_test.rb
Chery-pick a739340d3c9e66814429af6f3f410c01ff86810a:
Ensure ordering to make the test pass with postgresql
Conflicts:
activerecord/test/cases/relations_test.rb
|
| |
|
|
|
|
| |
(cherry picked from commit fa21b73ebb8339ad388f149c817c433b6254d490)
|
| |
|
|
|
|
|
|
|
| |
Also skip persistente tests related to UPDATE + ORDER BY for postgresql
PostgreSQL does not support updates with order by, and these tests are
failing randomly depending on the fixture loading order now.
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 5282485d310d1a6ffcf55e4e7f56ab234e16880d)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/dynamic_finder_match.rb
|
| |
|
|
|
|
|
| |
For consistency with find_or_initialize_by. Also remove first_or_build
alias.
|
| |
|
|\
| |
| | |
Add first_or_create family of methods to Active Record
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Active Record.
This let's you write things like:
User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson", :hot => true)
Related to #2420.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 0df27c98d982ec87d2fb48cfda82694eb267993e.
Reverted due to failing test, see #2845.
|
| |
| |
| | |
Replace split on comma with a regexp that will reverse all ASC/DESC specifically
|
|/
|
|
|
|
| |
test_update_all_with_joins_and_offset_and_order
Last two asserts in this test assume that all_comments are ordered by posts.id and then by comments.id therefore additional ordering is added. Without it test was failing on Oracle which returned results in different order.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 9d396ee8195e31f646e0b89158ed96f4db4ab38f, reversing
changes made to fa2bfd832c1d1e997d93c2269a485cc74782c86d.
Reason: the change broke the build.
|
| |
|
|
|
|
| |
criteria in any case as it's unique.
|
| |
|
|\
| |
| | |
Addresses an inconsistency in the ActiveRecord::Base.method_missing handl
|
| |
| |
| |
| | |
of dynamic finder methods and the passing of the &block parameter for :find_by_attributes.
|
| |
| |
| | |
Use latest Arel syntax and pass each order by expression as separate argument to order method as otherwise invalid Oracle SQL is generated.
|
| |
| |
| |
| |
| | |
* Only on postgresql, order("first asc, second asc") was invalid
* Closes #1720
|
| | |
|
| | |
|
|/
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master: (51 commits)
order is not guaranteed by this select, so add an order and call first!
oracle stores this with microseconds, so convert to seconds before comparing
make sure that active connections are not cleared during test when an exception happens
clearing active connections in the ConnectionManagement middleware if an exception happens
proxy body responses so we close database connections after body is flushed
Pass the proper method_name instead of hardcoding to action_name.
Quote find_in_batches ORDER BY clause [#6620 state:resolved]
Delegate first!, last!, any? and many? to scoped
Dont call authenticate_or_request_with_http_basic twice
Remove 'warning: ambiguous first argument' when running ActionPack tests
Change exists? so that it doesn't instantiate records [#6127 state:resolved]
Move mapper_test to the appropriate location
Update the wildcard route to be non-greedy by default, therefore be able to match the (.:format) segment [#6605 state:resolved]
Fix examples
Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH]
make sure we have an active database connection before running each connection management test
adding active_connections? to the connection pool for finding open connections
adding active_connection? to the connection pool
testing app delegation from the ConnectionManagement middleware
namespacing connection management tests. :heart:
...
|
| |
| |
| |
| | |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| | |
|
|\| |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master:
Do not show optional (.:format) block for wildcard route [#6605 state:resolved]
pushing id insertion and prefetch primary keys down to Relation#insert
use prepared statements to fetch the last insert id
escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [#6559 state:resolved]
schemas set by set_table_name are respected by the mysql adapter. [#5322 state:resolved]
Reapply extensions when using except and only
SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test
Improved resolver docs a bit
[action_view] docs for FileSystemResolver
[action_view] added custom patterns to template resolver
|
| | | |
|
| | |
| | |
| | |
| | | |
and postgres
|
| |\| |
|
| | |
| | |
| | |
| | |
| | | |
The test fails on PostgreSQL when trying to load the records as
the comments_count field is not included in the GROUP BY clause.
|
| | |
| | |
| | |
| | |
| | |
| | | |
[#5829 state:resolved]
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
|
| | |
| | |
| | |
| | | |
to be eager-loaded via a JOIN rather than via subsequent queries.
|
| | |
| | |
| | |
| | | |
to be eager-loaded via a JOIN rather than via subsequent queries.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/class_methods/join_dependency.rb
activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/associations/has_one_through_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
activerecord/lib/active_record/reflection.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
activerecord/test/cases/associations/has_one_through_associations_test.rb
activerecord/test/cases/reflection_test.rb
activerecord/test/cases/relations_test.rb
activerecord/test/fixtures/memberships.yml
activerecord/test/models/categorization.rb
activerecord/test/models/category.rb
activerecord/test/models/member.rb
activerecord/test/models/reference.rb
activerecord/test/models/tagging.rb
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
activerecord/lib/active_record/associations.rb
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Conflicts:
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/test/schema/schema.rb
|