Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Perfer to define methods instead of calling test | Rafael Mendonça França | 2014-04-22 | 1 | -4/+4 | |
| | | | | This file is using this pattern already | |||||
* | Fix syntax error | Rafael Mendonça França | 2014-04-22 | 1 | -0/+1 | |
| | ||||||
* | Merge pull request #14573 from habermann24/has_many_through_fix | Rafael Mendonça França | 2014-04-22 | 1 | -0/+11 | |
|\ | | | | | | | | | | | | | | | Properly handle scoping with has_many :through. Fixes #14537. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/associations/has_many_through_associations_test.rb | |||||
| * | Properly handle scoping with has_many :through. Fixes #14537. | Jan Habermann | 2014-04-03 | 1 | -0/+12 | |
| | | ||||||
* | | Merge pull request #12829 from iantropov/issue_insert_via_hmt_scope_3548 | Rafael Mendonça França | 2014-04-10 | 1 | -1/+13 | |
|\ \ | |/ |/| | | | | | | | | | Fix insertion of records for hmt association with scope Conflicts: activerecord/CHANGELOG.md | |||||
| * | Fix insertion of records for hmt association with scope, fix #3548 | Ivan Antropov | 2013-11-17 | 1 | -1/+13 | |
| | | ||||||
* | | Add regression test for collection proxy reader | Arthur Neves | 2014-02-20 | 1 | -0/+7 | |
|/ | | | | [related #14116] | |||||
* | Prevent the counter cache from being decremented twice | dm1try | 2013-11-11 | 1 | -0/+9 | |
| | | | | | when destroying a record on a has_many :through association. :destroy method has own counter_cache callbacks. | |||||
* | Assert the return value in the test | Rafael Mendonça França | 2013-10-27 | 1 | -1/+1 | |
| | ||||||
* | Skip `include_values` from through associations chains for building target scope | Paul Nikitochkin | 2013-10-27 | 1 | -0/+4 | |
| | | | | Fixes: #12242, #9517, #10240 | |||||
* | Using flat_map instead of map and flatten | Arun Agrawal | 2013-10-09 | 1 | -1/+1 | |
| | | | | | | original commit 8998441967a8cfc6e4302c29664ab9d0acd77704 Reverted here ec8ef1e1055c4e1598da13f49d30261f07f4a9b4 | |||||
* | adding a test to demonstrate how to use STI subclasses on the far right | Aaron Patterson | 2013-09-27 | 1 | -0/+7 | |
| | | | | side of a hm:t association along with preloading. | |||||
* | 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 | |
| | ||||||
* | fix deleting join models with no pk | Aaron Patterson | 2013-09-11 | 1 | -5/+47 | |
| | ||||||
* | hm:t join tables may not have a primary key | Aaron Patterson | 2013-09-06 | 1 | -0/+18 | |
| | ||||||
* | adding a hm:t test for singleton ar objects | Aaron Patterson | 2013-09-03 | 1 | -0/+27 | |
| | ||||||
* | 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 | |
| | ||||||
* | 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. | |||||
* | | add a test for concat on hm:t associations | Aaron Patterson | 2013-08-02 | 1 | -0/+7 | |
|/ | ||||||
* | 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. | |||||
* | Do not invoke callbacks when delete_all is called | Neeraj Singh | 2013-06-30 | 1 | -0/+34 | |
| | | | | | | | | | | | 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)` | |||||
* | has_many through obeys order on through association | Neeraj Singh | 2013-04-04 | 1 | -1/+7 | |
| | | | | fixes #10016 | |||||
* | Prevent Relation#merge from collapsing wheres on the RHS | Jon Leighton | 2013-01-27 | 1 | -0/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | This caused a bug with the new associations implementation, because now association conditions are represented as Arel nodes internally right up to when the whole thing gets turned to SQL. In Rails 3.2, association conditions get turned to raw SQL early on, which prevents Relation#merge from interfering. The current implementation was buggy when a default_scope existed on the target model, since we would basically end up doing: default_scope.merge(association_scope) If default_scope contained a where(foo: 'a') and association_scope contained a where(foo: 'b').where(foo: 'c') then the merger would see that the same column is representated on both sides of the merge and collapse the wheres to all but the last: where(foo: 'c') Now, the RHS of the merge is left alone. Fixes #8990 | |||||
* | Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by" | Guillermo Iguaran | 2013-01-18 | 1 | -1/+1 | |
| | | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1. | |||||
* | User Rails 4 find_by | robertomiranda | 2013-01-18 | 1 | -1/+1 | |
| | ||||||
* | Rename update_attributes method to update, keep update_attributes as an alias | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 1 | -1/+1 | |
| | ||||||
* | Fix for has_many_through counter_cache bug | Matthew Robertson | 2012-12-14 | 1 | -0/+11 | |
| | | | | | | This commit fixes reported issue #7630 in which counter caches were not being updated properly when replacing has_many_through relationships | |||||
* | Merge and add tests related to 5215 | Vipul A M | 2012-11-12 | 1 | -6/+13 | |
| | ||||||
* | remove duplicated require statements in AR test cases | Yves Senn | 2012-10-09 | 1 | -1/+0 | |
| | ||||||
* | Revert "Use flat_map { } instead of map {}.flatten" | Santiago Pastorino | 2012-10-05 | 1 | -1/+1 | |
| | | | | | | | | | | | This reverts commit abf8de85519141496a6773310964ec03f6106f3f. We should take a deeper look to those cases flat_map doesn't do deep flattening. irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten => [1, 3, 1, 2] irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i} => [[1, 3], [1, 2]] | |||||
* | Use flat_map { } instead of map {}.flatten | Santiago Pastorino | 2012-10-05 | 1 | -1/+1 | |
| | ||||||
* | Count returns 0 without querying if parent is not saved | Francesco Rodriguez | 2012-10-03 | 1 | -0/+6 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches `CollectionAssociation#count` to return 0 without querying if the parent record is new. Consider the following code: class Account has_many :dossiers end class Dossier belongs_to :account end a = Account.new a.dossiers.build # before patch a.dossiers.count # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL # => 0 # after a.dosiers.count # fires without sql query # => 0 Fixes #1856. | |||||
* | Merge pull request #7251 from rails/integrate-strong_parameters | David Heinemeier Hansson | 2012-09-18 | 1 | -15/+0 | |
|\ | | | | | Integrate strong_parameters in Rails 4 | |||||
| * | Remove mass assignment security from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -15/+0 | |
| | | ||||||
* | | Fix collection= on hm:t join models when unsaved | Ernie Miller | 2012-09-17 | 1 | -0/+5 | |
|/ | | | | | | If assigning to a has_many :through collection against an unsaved object using the collection=[<array_of_items>] syntax, the join models were not properly created, previously. | |||||
* | ActiveRecord::Base.all returns a Relation. | Jon Leighton | 2012-07-27 | 1 | -2/+2 | |
| | | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway. | |||||
* | Deprecate update_column in favor of update_columns. | Rafael Mendonça França | 2012-07-24 | 1 | -2/+2 | |
| | | | | Closes #1190 | |||||
* | rm unnecessary test | Jon Leighton | 2012-07-20 | 1 | -7/+0 | |
| | | | | | interpolation is no longer a thing separate from "normal" assoc conditions. | |||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 1 | -3/+3 | |
| | ||||||
* | remove deprecate #calculate calls | Jon Leighton | 2012-04-26 | 1 | -1/+1 | |
| | ||||||
* | Merge pull request #5289 from rafaelfranca/fix-through-associations | Jon Leighton | 2012-03-08 | 1 | -4/+20 | |
|\ | | | | | Fix has_many through associations when mass_assignment_sanitizer is strict | |||||
| * | Not need to pass join attributes to association build | Rafael Mendonça França | 2012-03-07 | 1 | -3/+2 | |
| | | ||||||
| * | Add test case to has_many through association when mass_assignment_sanitizer is | Rafael Mendonça França | 2012-03-05 | 1 | -4/+21 | |
| | | | | | | | | :strict |