Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | | Make sure inverse_of is visible on the has_many callbacks | Arthur Neves | 2013-09-25 | 1 | -0/+7 | |
| | | | ||||||
* | | | push preloaded test up to the factory method so we can eliminate | Aaron Patterson | 2013-09-24 | 1 | -1/+0 | |
| | | | | | | | | | | | | conditionals from the individual preloaded classes | |||||
* | | | we can't sort by lhs since the middle records have difference classes | Aaron Patterson | 2013-09-23 | 1 | -1/+2 | |
| | | | | | | | | | | | | and possibly different rules for finding those objects | |||||
* | | | adding a test for sti on middle tables with sorting on RHS | Aaron Patterson | 2013-09-23 | 1 | -1/+14 | |
| | | | ||||||
* | | | hm:t preloading will respect order set on the RHS association | Aaron Patterson | 2013-09-23 | 1 | -0/+15 | |
|/ / | ||||||
* | | Merge pull request #12011 from jetthoughts/11963_fix_join_with_association_scope | Rafael Mendonça França | 2013-09-16 | 1 | -0/+5 | |
|\ \ | | | | | | | | | | | | | | | | | | | Collapse where constraints to the Arel::Nodes::And node Conflicts: activerecord/CHANGELOG.md | |||||
| * | | Collapse where constraints to one where constraint | Paul Nikitochkin | 2013-09-13 | 1 | -0/+5 | |
| | | | | | | | | | | | | | | | | | | | | | In order to remove duplication with joining arel where constraints with `AND`, all constraints on `build_arel` are collapsed into one head node: `Arel::Nodes::And` Closes: #11963 | |||||
* | | | Merge pull request #12137 from lann/fix_association_first_last | Rafael Mendonça França | 2013-09-12 | 1 | -3/+5 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Make CollectionAssociation first/last with integer fetch with query Conflicts: activerecord/CHANGELOG.md | |||||
| * | | | Make CollectionAssociation first/last with integer fetch with query | Lann Martin | 2013-09-09 | 1 | -3/+5 | |
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When first or last is called with an integer on an unloaded association, the entire collection is loaded. This differs surprisingly from the behavior of Relation#first/last, which translate the call into a limit query. For large collections this can make a big difference in performance. Change CollectionAssociation#fetch_first_or_last_using_find? to make this kind of call delegate to Relation. | |||||
* | | | these are not real developer objects, so counting them doesn't make | Aaron Patterson | 2013-09-11 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | sense. Let's load the object to ensure it's an array and count the array. | |||||
* | | | Merge pull request #12135 from dylanahsmith/avoid_empty_transaction | Rafael Mendonça França | 2013-09-11 | 1 | -0/+2 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Avoid empty transaction from setting has_one association on new record. Conflicts: activerecord/CHANGELOG.md | |||||
| * | | | Avoid empty transaction from setting has_one association on new record. | Dylan Thacker-Smith | 2013-09-11 | 1 | -0/+2 | |
| | | | | ||||||
* | | | | fix deleting join models with no pk | Aaron Patterson | 2013-09-11 | 1 | -5/+47 | |
|/ / / | ||||||
* | | | add a comment for sanity of other people to come | Aaron Patterson | 2013-09-10 | 1 | -0/+8 | |
| | | | ||||||
* | | | hm:t join tables may not have a primary key | Aaron Patterson | 2013-09-06 | 1 | -0/+18 | |
|/ / | ||||||
* | | Merge pull request #11958 from jetthoughts/extract_pre_process_orders_args | Yves Senn | 2013-09-04 | 1 | -2/+5 | |
|\ \ | | | | | | | Re-use order arguments pre-processing for reorder | |||||
| * | | Extracted from `order` processing of arguments, and use it for `reorder` to ↵ | Paul Nikitochkin | 2013-09-04 | 1 | -2/+5 | |
| | | | | | | | | | | | | be consistent. | |||||
* | | | adding a hm:t test for singleton ar objects | Aaron Patterson | 2013-09-03 | 1 | -0/+27 | |
| | | | ||||||
* | | | support anonymous classes on has_many associations | Aaron Patterson | 2013-09-03 | 1 | -0/+18 | |
| | | | ||||||
* | | | Don't need to check if the scope respond to call | Rafael Mendonça França + Kassio Borges | 2013-08-31 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | We are checking this when defining the default scope and raising an ArgumentError | |||||
* | | | add missing fixtures file | Aaron Patterson | 2013-08-30 | 1 | -1/+2 | |
| | | | ||||||
* | | | make sure there are actually some categories when running the test | Aaron Patterson | 2013-08-29 | 1 | -0/+1 | |
| | | | ||||||
* | | | pk should not be required for hm:t associations | Aaron Patterson | 2013-08-29 | 1 | -0/+7 | |
|/ / | ||||||
* | | query the association rather than send the method for the association name | Aaron Patterson | 2013-08-27 | 1 | -6/+4 | |
| | | ||||||
* | | Merge branch 'master' of github.com:rails/docrails | Vijay Dev | 2013-08-17 | 1 | -1/+1 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionview/README.rdoc activerecord/lib/active_record/migration.rb guides/source/development_dependencies_install.md guides/source/getting_started.md | |||||
| * | | Revert "Merge branch 'master' of github.com:rails/docrails" | Vijay Dev | 2013-08-17 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9. Seems to be a code merge done by mistake. | |||||
* | | | Fixing multi-word automatic inverse detection. | wangjohn | 2013-08-15 | 1 | -0/+14 | |
| | | | | | | | | | | | | | | | Currently, ActiveRecord models with multiple words cannot have their inverse associations detected automatically. | |||||
* | | | using assert_not instead of refute | Rajarshi Das | 2013-08-13 | 1 | -1/+1 | |
| | | | ||||||
* | | | add a test for concat on hm:t associations | Aaron Patterson | 2013-08-02 | 1 | -0/+7 | |
| | | | ||||||
* | | | association builder classes no longer need the model | Aaron Patterson | 2013-08-01 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | decouple the builder classes from the model. Builder objects should be easier to reuse now. | |||||
* | | | no need to define the constant twice | Aaron Patterson | 2013-08-01 | 1 | -1/+0 | |
| | | | ||||||
* | | | assert that constants have been set rather than the names | Aaron Patterson | 2013-08-01 | 1 | -6/+8 | |
| | | | ||||||
* | | | Merge pull request #11668 from neerajdotname/make_test_order_independent_2 | Rafael Mendonça França | 2013-07-30 | 1 | -1/+3 | |
|\ \ \ | | | | | | | | | Make test order independent | |||||
| * | | | assert_no_queries should ignore certain sqls | Neeraj Singh | 2013-07-30 | 1 | -1/+3 | |
| | | | | | | | | | | | | | | | | | | | | postgresql test if randomly executed then executes "SHOW max_identifier_length". Hence the need to ignore certain predefined sqls that deal with system calls. | |||||
* | | | | Revert change on ActiveRecord::Relation#order method that prepends new | Rafael Mendonça França | 2013-07-29 | 2 | -4/+4 | |
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order on the old ones The previous behavior added a major backward incompatibility since it impossible to have a upgrade path without major changes on the application code. We are taking the most conservative path to be consistent with the idea of having a smoother upgrade on Rails 4. We are reverting the behavior for what was in Rails 3.x and, if needed, we will implement a new API to prepend the order clauses in Rails 4.1. | |||||
* | | | Clear class ivar before testing | Akira Matsuda | 2013-07-29 | 1 | -0/+2 | |
| | | | ||||||
* | | | Unneeded assertion | Akira Matsuda | 2013-07-29 | 1 | -1/+1 | |
| | | | ||||||
* | | | make test not depend on order | Neeraj Singh | 2013-07-28 | 1 | -0/+1 | |
|/ / | | | | | | | | | | | | | `NestedThroughAssociationsTest` adds records to `member_details` table. When test performs `@member_details[0]` then the order of record is not guaranteed. Hence it is best to start with a clean slate by deleting unwanted records. | |||||
* | | used flat_map instead of map.flatten | Karunakar (Ruby) | 2013-07-25 | 1 | -1/+1 | |
| | | ||||||
* | | Make sure that a joins Relation can be merged with has_many :through + ↵ | Akira Matsuda | 2013-07-10 | 1 | -0/+6 | |
| | | | | | | | | | | | | association proxy Closes #11248. | |||||
* | | Remove redundant test about `push_with_attributes` removal. | Vipul A M | 2013-07-09 | 1 | -7/+0 | |
| | | ||||||
* | | #11288: Removed duplicated touching | Paul Nikitochkin | 2013-07-05 | 1 | -1/+42 | |
| | | | | | | | | | | | | if belongs to model with touch option on touch Closes #11288 | |||||
* | | Cleanup belongs to tests | Paul Nikitochkin | 2013-07-05 | 1 | -2/+1 | |
| | | | | | | | | simplified logic to calculate number of queries by using assert_queries | |||||
* | | Dropped deprecated option `:restrict` for `:dependent` in associations | Neeraj Singh | 2013-07-03 | 2 | -31/+0 | |
| | | ||||||
* | | Removed support for deprecated `delete_sql` in associations. | Neeraj Singh | 2013-07-03 | 1 | -25/+0 | |
| | | ||||||
* | | Removed support for deprecated `finder_sql` in associations. | Neeraj Singh | 2013-07-02 | 2 | -140/+0 | |
| | | ||||||
* | | Removed support for deprecated `counter_sql` | Neeraj Singh | 2013-07-02 | 2 | -45/+0 | |
| | | ||||||
* | | Merge pull request #10604 from ↵ | Rafael Mendonça França | 2013-07-01 | 2 | -2/+59 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | neerajdotname/delete_all_should_not_call_callbacks Do not invoke callbacks when delete_all is called Conflicts: activerecord/CHANGELOG.md | |||||
| * | | Do not invoke callbacks when delete_all is called | Neeraj Singh | 2013-06-30 | 2 | -2/+59 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method `delete_all` should not be invoking callbacks and this feature was deprecated in Rails 4.0. This is being removed. `delete_all` will continue to honor the `:dependent` option. However if `:dependent` value is `:destroy` then the default deletion strategy for that collection will be applied. User can also force a deletion strategy by passing parameter to `delete_all`. For example you can do `@post.comments.delete_all(:nullify)` | |||||
* | | | Removed deprecated options for assocations | Neeraj Singh | 2013-07-02 | 2 | -22/+0 | |
|/ / | | | | | | | | | Deprecated options `delete_sql`, `insert_sql`, `finder_sql` and `counter_sql` have been deleted. |