Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix find_in_batches with customized primary_key | Toshiyuki Kawanishi | 2012-09-16 | 1 | -0/+5 |
| | |||||
* | Add a test to make sure preloading properly merges association and default ↵ | Pratik Naik | 2012-08-28 | 1 | -0/+3 |
| | | | | scope conditions | ||||
* | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -3/+4 |
| | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | ||||
* | rm unnecessary test | Jon Leighton | 2012-07-20 | 1 | -4/+0 |
| | | | | | interpolation is no longer a thing separate from "normal" assoc conditions. | ||||
* | Convert association macros to the new syntax | Jon Leighton | 2012-07-20 | 1 | -16/+17 |
| | |||||
* | %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵ | Jon Leighton | 2012-04-27 | 1 | -3/+3 |
| | | | | things | ||||
* | remove deprecated scope stuff | Jon Leighton | 2012-04-26 | 1 | -8/+1 |
| | |||||
* | Deprecate eager-evaluated scopes. | Jon Leighton | 2012-03-21 | 1 | -8/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use this: scope :red, where(color: 'red') default_scope where(color: 'red') Use this: scope :red, -> { where(color: 'red') } default_scope { where(color: 'red') } The former has numerous issues. It is a common newbie gotcha to do the following: scope :recent, where(published_at: Time.now - 2.weeks) Or a more subtle variant: scope :recent, -> { where(published_at: Time.now - 2.weeks) } scope :recent_red, recent.where(color: 'red') Eager scopes are also very complex to implement within Active Record, and there are still bugs. For example, the following does not do what you expect: scope :remove_conditions, except(:where) where(...).remove_conditions # => still has conditions | ||||
* | Add test case to has_many through association when mass_assignment_sanitizer is | Rafael Mendonça França | 2012-03-05 | 1 | -0/+2 |
| | | | | :strict | ||||
* | Fix #3890. (Calling proxy_association in scope chain.) | Jon Leighton | 2011-12-08 | 1 | -1/+5 |
| | |||||
* | don't change class definition in test case | Josh Susser | 2011-11-29 | 1 | -0/+4 |
| | |||||
* | We need to recorder here. Need to drop the order from default scope. | Arun Agrawal | 2011-09-05 | 1 | -0/+10 |
| | | | Fixes #2832 | ||||
* | Test added for namedscope target. | Arun Agrawal | 2011-06-03 | 1 | -0/+4 |
| | |||||
* | Ignore :includes on through associations | Andrew White | 2011-05-24 | 1 | -0/+6 |
| | |||||
* | Un-deprecate using 'default_scope' as a macro, but if you are calling the ↵ | Jon Leighton | 2011-04-18 | 1 | -4/+1 |
| | | | | macro multiple times that will give deprecation warnings, and in 3.2 we will simply overwrite the default scope when you call the macro multiple times. | ||||
* | Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via ↵ | Jon Leighton | 2011-04-17 | 1 | -11/+9 |
| | | | | | | | | | | the scope class method. Just define a class method yourself instead." This reverts commit f0e198bfa1e3f9689e0cde1d194a44027fc90b3c. Conflicts: activerecord/test/models/post.rb | ||||
* | common @jonleighton :bomb: | Aaron Patterson | 2011-04-12 | 1 | -2/+1 |
| | |||||
* | Deprecate defining scopes with a callable (lambda, proc, etc) via the scope ↵ | Jon Leighton | 2011-04-12 | 1 | -9/+13 |
| | | | | class method. Just define a class method yourself instead. | ||||
* | Deprecated support for passing hashes and relations to default_scope, in ↵ | Jon Leighton | 2011-04-12 | 1 | -5/+10 |
| | | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details. | ||||
* | oracle, y u defy me | Jon Leighton | 2011-03-16 | 1 | -4/+4 |
| | |||||
* | Add a test for STI on the through where the through is nested, and change ↵ | Jon Leighton | 2011-03-05 | 1 | -0/+1 |
| | | | | the code which support this | ||||
* | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2011-03-04 | 1 | -2/+33 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
| * | Allow building and then later saving has_many :through records, such that ↵ | Jon Leighton | 2011-02-18 | 1 | -0/+1 |
| | | | | | | | | the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved] | ||||
| * | Ensure that association_ids uses the correct attribute where the association ↵ | Jon Leighton | 2011-02-18 | 1 | -0/+1 |
| | | | | | | | | is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved] | ||||
| * | Add interpolation of association conditions back in, in the form of proc { ↵ | Jon Leighton | 2011-02-14 | 1 | -0/+7 |
| | | | | | | | | ... } rather than instance_eval-ing strings | ||||
| * | Correctly update counter caches on deletion for has_many :through [#2824 ↵ | Jon Leighton | 2011-02-07 | 1 | -0/+5 |
| | | | | | | | | state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business. | ||||
| * | Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵ | Jon Leighton | 2011-01-03 | 1 | -1/+1 |
| | | | | | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences. | ||||
| * | removing SQL interpolation, please use scoping and attribute conditionals as ↵ | Aaron Patterson | 2010-12-22 | 1 | -3/+0 |
| | | | | | | | | a replacement | ||||
| * | has_many associations with :dependent => :delete_all should update the ↵ | Jon Leighton | 2010-12-20 | 1 | -0/+2 |
| | | | | | | | | counter cache when deleting records | ||||
| * | Fix problem where wrong keys are used in JoinAssociation when an association ↵ | Jon Leighton | 2010-12-20 | 1 | -0/+1 |
| | | | | | | | | goes :through a belongs_to [#2801 state:resolved] | ||||
| * | Fix various issues with the :primary_key option in :through associations ↵ | Jon Leighton | 2010-12-15 | 1 | -0/+10 |
| | | | | | | | | [#2421 state:resolved] | ||||
| * | Respect the default_scope on a join model when reading a through association | Jon Leighton | 2010-12-16 | 1 | -0/+7 |
| | | |||||
* | | Fix naughty trailing whitespace | Jon Leighton | 2010-10-31 | 1 | -2/+2 |
| | | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-10-28 | 1 | -0/+6 |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb | ||||
| * | Allow default_scope to accept a Proc. | Tim Morgan | 2010-10-19 | 1 | -0/+6 |
| | | |||||
* | | Add explicit tests for the nested through association changes in reflection.rb | Jon Leighton | 2010-10-19 | 1 | -0/+1 |
| | | |||||
* | | Properly support conditions on any of the reflections involved in a nested ↵ | Jon Leighton | 2010-10-19 | 1 | -0/+5 |
| | | | | | | | | through association | ||||
* | | Add support for nested through associations in JoinAssociation. Hence ↵ | Jon Leighton | 2010-10-09 | 1 | -0/+2 |
|/ | | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored. | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -1/+1 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Eager loading :through associations will join the :source model if there are ↵ | Grant Ammons | 2010-07-08 | 1 | -0/+1 |
| | | | | | | :conditions. [#2362 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix for get_ids when including a belongs_to association on a has_many ↵ | Diego Algorta | 2010-05-15 | 1 | -0/+1 |
| | | | | | | association [#2896 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add Relation extensions | Pratik Naik | 2010-04-02 | 1 | -0/+6 |
| | |||||
* | Make default_scope work with Relations | Pratik Naik | 2010-01-23 | 1 | -0/+5 |
| | |||||
* | Simplify calculation scope building. Remove :order from associations as it ↵ | Pratik Naik | 2010-01-18 | 1 | -1/+1 |
| | | | | is troublesome w/ calculation methods using postgresql. | ||||
* | Rename named_scope to scope | Pratik Naik | 2010-01-18 | 1 | -7/+7 |
| | |||||
* | Make relations work as scopes | Pratik Naik | 2010-01-17 | 1 | -4/+4 |
| | |||||
* | Make sure named_scope names are not used as method names already | Pratik Naik | 2010-01-17 | 1 | -2/+2 |
| | |||||
* | Ensure hm:t#create respects source associations hash conditions [#2090 ↵ | mattbauer | 2009-06-21 | 1 | -0/+2 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fixed bug that makes named_scopes _forgot_ current scope | Diego Algorta | 2009-02-25 | 1 | -0/+6 |
| | |||||
* | Make sure inner scope conditions get a preference over the outer ones | Pratik Naik | 2009-01-24 | 1 | -0/+6 |
| |