Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Fix #5667. Preloading should ignore scoping. | Jon Leighton | 2012-03-30 | 1 | -2/+3 | |
|/ / | ||||||
* | | Remove IdentityMap | Carlos Antonio da Silva | 2012-03-13 | 1 | -12/+1 | |
| | | ||||||
* | | In AR depths use &:to_i before :uniq to process mixed arrays likes ["1", 1] ↵ | Alexey Vakhov | 2012-03-09 | 1 | -1/+1 | |
| | | | | | | | | correct | |||||
* | | Not need to pass join attributes to association build | Rafael Mendonça França | 2012-03-07 | 2 | -4/+10 | |
| | | ||||||
* | | Fix #5069 - Protect foreign key from mass assignment throught association ↵ | Jean Boussier | 2012-03-05 | 1 | -1/+2 | |
| | | | | | | | | builder | |||||
* | | Initialize @stale_state to nil in association | Carlos Antonio da Silva | 2012-03-04 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | This apparently fix the warning related to @new_record variable not being initialized in AR's test suit, when an association is built and the object is marshalled/loaded. See these tests in AR's base_test.rb: test_marshalling_with_associations test_marshalling_new_record_round_trip_with_associations Closes #3720. | |||||
* | | Revert "only mutate the scope object in the `bind` method" | Aaron Patterson | 2012-02-27 | 1 | -1/+1 | |
| | | | | | | | | This reverts commit 1b9e19cd22f2b5d5e7b82e042f92340822c0f966. | |||||
* | | only mutate the scope object in the `bind` method | Aaron Patterson | 2012-02-27 | 1 | -1/+1 | |
| | | ||||||
* | | bind value creation refactoring | Aaron Patterson | 2012-02-27 | 1 | -4/+10 | |
| | | ||||||
* | | removing dead code | Aaron Patterson | 2012-02-27 | 1 | -3/+2 | |
| | | ||||||
* | | use bind values for join columns | Aaron Patterson | 2012-02-27 | 1 | -1/+16 | |
| | | ||||||
* | | fix associations when using per class databases | Lars Kanis | 2012-02-10 | 3 | -8/+5 | |
| | | | | | | | | | | | | would get ConnectionNotEstablished error because it always tried to use ActiveRecord::Base's connection, even though it should be using the connection of the model whose context we're operating in | |||||
* | | Merge pull request #4543 from jdelStrother/find_or_init | Jon Leighton | 2012-02-01 | 1 | -2/+1 | |
|\ \ | |/ |/| | Don't instantiate two objects in collection proxy / find_or_instantiate_by | |||||
| * | Don't instantiate two objects in collection proxy / find_or_instantiator_by | Jonathan del Strother | 2012-01-19 | 1 | -2/+1 | |
| | | ||||||
* | | Use human attribute name to show the dependent destroy message | Rafael Mendonça França | 2012-02-01 | 1 | -1/+2 | |
| | | ||||||
* | | fix has_one, has_many restrict error message | Manoj | 2012-02-01 | 1 | -1/+2 | |
| | | ||||||
* | | Merge pull request #4799 from arunagw/warning_fixed_for_indentations | Aaron Patterson | 2012-01-31 | 1 | -1/+1 | |
|\ \ | | | | | | | warning removed: mismatched indentations | |||||
| * | | warning removed: mismatched indentations | Arun Agrawal | 2012-01-31 | 1 | -1/+1 | |
| | | | ||||||
* | | | Put spaces between the words at deprecation warning | Rafael Mendonça França | 2012-01-31 | 1 | -3/+3 | |
|/ / | ||||||
* | | Merge pull request #4783 from gregolsen/ids_reader_fix | Jon Leighton | 2012-01-31 | 1 | -1/+1 | |
|\ \ | | | | | | | ids_reader method fixed, test added to has_many association (for PostgreSQL) | |||||
| * | | ids_reader method fixed, test added to has_many association | gregolsen | 2012-01-31 | 1 | -1/+1 | |
| |/ | ||||||
* | | suggested fixes for :dependent => :restrict deprecation. | Manoj | 2012-01-31 | 1 | -1/+1 | |
| | | ||||||
* | | Same method for has_many and has_one associations | Paco Guzman | 2012-01-31 | 3 | -30/+17 | |
| | | ||||||
* | | Easy dependent_restrict error message | Paco Guzman | 2012-01-31 | 2 | -4/+2 | |
| | | ||||||
* | | has_many/has_one, :dependent => :restrict, deprecation added. | Manoj | 2012-01-29 | 3 | -3/+35 | |
|/ | ||||||
* | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 2 | -2/+2 | |
| | | | | | | See the CHANGELOG for details. Fixes #950. | |||||
* | Avoid sanitize_sql when we can use Relation#where instead | Jon Leighton | 2012-01-16 | 4 | -22/+16 | |
| | ||||||
* | Revert "Deprecate implicit eager loading. Closes #950." | Jon Leighton | 2012-01-16 | 4 | -4/+2 | |
| | | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9. | |||||
* | Remove Array.wrap calls in ActiveRecord | Rafael Mendonça França | 2012-01-06 | 4 | -7/+5 | |
| | ||||||
* | Use 1.9 way | Santiago Pastorino | 2012-01-05 | 1 | -6/+1 | |
| | ||||||
* | Removed metaclass from the has_many dependency destroy method. Fixes #2954 | Dmitry Polushkin | 2011-12-31 | 2 | -8/+5 | |
| | ||||||
* | Deprecate implicit eager loading. Closes #950. | Jon Leighton | 2011-12-29 | 4 | -2/+4 | |
| | ||||||
* | added failing tests for has_many, has_one and belongs_to associations with ↵ | Jakub Kuźma | 2011-12-21 | 1 | -6/+1 | |
| | | | | strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051 | |||||
* | bypass preloading for ids_reader | Sergey Nartimov | 2011-12-18 | 1 | -2/+10 | |
| | | | | | when fetching ids for a collection, bypass preloading to avoid the unnecessary performance overhead | |||||
* | Allow nested attributes in associations to update values in it's owner ↵ | Andrew Kaspick | 2011-12-14 | 1 | -0/+2 | |
| | | | | object. Fixes a regression from 3.0.x | |||||
* | Fix #3672 again (dependent: delete_all perf) | Jon Leighton | 2011-12-14 | 6 | -9/+26 | |
| | ||||||
* | Fix #3890. (Calling proxy_association in scope chain.) | Jon Leighton | 2011-12-08 | 1 | -2/+8 | |
| | ||||||
* | reintroduce patch from #726 to handle nested eager loading via associations | Jay Levitt | 2011-11-30 | 1 | -1/+1 | |
| | ||||||
* | ActiveRecord::Relation#pluck method | Bogdan Gusiev | 2011-11-30 | 1 | -1/+1 | |
| | ||||||
* | Merge pull request #3636 from joshsusser/master | Jon Leighton | 2011-11-29 | 6 | -21/+22 | |
|\ | | | | | association methods are now generated in modules | |||||
| * | avoid warnings | Josh Susser | 2011-11-27 | 6 | -15/+15 | |
| | | | | | | | | | | | | | | This change uses Module.redefine_method as defined in ActiveSupport. Making Module.define_method public would be as clean in the code, and would also emit warnings when redefining an association. That is pretty messy given current tests, so I'm leaving it for someone else to decide what approach is better. | |||||
| * | use GeneratedFeatureMethods module for associations | Josh Susser | 2011-11-27 | 2 | -7/+13 | |
| | | ||||||
| * | association methods are now generated in modules | Josh Susser | 2011-11-15 | 7 | -30/+25 | |
| | | | | | | | | | | | | | | | | | | | | Instead of generating association methods directly in the model class, they are generated in an anonymous module which is then included in the model class. There is one such module for each association. The only subtlety is that the generated_attributes_methods module (from ActiveModel) must be forced to be included before association methods are created so that attribute methods will not shadow association methods. | |||||
* | | load has_many associations keyed off a custom primary key if that key is ↵ | Brian Samson | 2011-11-25 | 2 | -1/+5 | |
| | | | | | | | | present but the record is unsaved | |||||
* | | Perf fix | Jon Leighton | 2011-11-19 | 1 | -2/+6 | |
|/ | | | | | | | If we're deleting all records in an association, don't add a IN(..) clause to the query. Fixes #3672. | |||||
* | Use uniq instead of manually putting a DISTINCT in the query | Jon Leighton | 2011-11-05 | 1 | -14/+2 | |
| | ||||||
* | Merge pull request #3507 from jmazzi/issue-3503 | Jeremy Kemper | 2011-11-03 | 1 | -2/+6 | |
| | | | | Preserve SELECT columns on the COUNT for finder_sql when possible | |||||
* | Memoize through association | Jon Leighton | 2011-11-03 | 1 | -8/+11 | |
| | ||||||
* | Remove all revelant through records. | Jon Leighton | 2011-11-03 | 1 | -9/+9 | |
| | | | | | | | | | If a record is removed from a has_many :through, all of the join records relating to that record should also be removed from the through association's target. (Previously the records were removed in the database, but only one was removed from the in-memory target array.) | |||||
* | Fix adding multiple instances of the same record to a has_many :through. | Jon Leighton | 2011-11-03 | 1 | -21/+43 | |
| | | | | Fixes #3425. |