Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename Model.engine to active_relation_engine. Cache arel_table and the ↵ | Pratik Naik | 2010-01-02 | 1 | -1/+1 |
| | | | | method takes no arguments now | ||||
* | Make Model.find_by_* and Model.find_all_by_* use relations and remove ↵ | Pratik Naik | 2009-12-27 | 1 | -15/+3 |
| | | | | dynamic method caching | ||||
* | Ensure Model.scoped adds type conditions for STI models | Pratik Naik | 2009-12-27 | 1 | -0/+1 |
| | |||||
* | Add Model.select/group/order/limit/joins/conditions/preload/eager_load class ↵ | Pratik Naik | 2009-12-26 | 1 | -1/+20 |
| | | | | | | | | | methods returning a lazy relation. Examples : posts = Post.select('id).order('name') # Returns a lazy relation posts.each {|p| puts p.id } # Fires "select id from posts order by name" | ||||
* | Model.scoped now returns a relation if invoked without any arguments | Pratik Naik | 2009-12-26 | 1 | -11/+19 |
| | | | | | | | | Example : posts = Post.scoped posts.size # Fires "select count(*) from posts" and returns the count posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects | ||||
* | Revert "Methods invoked within named scope Procs should respect the scope ↵ | Jeremy Kemper | 2009-07-29 | 1 | -6/+1 |
| | | | | | | | | | | stack. [#1267 state:resolved]" This reverts commit 6a13376525f34a00e013fc3a6022838329dfe856. Conflicts: activerecord/test/cases/named_scope_test.rb | ||||
* | uses Object#metaclass and Object#class_eval in a few spots | Xavier Noria | 2009-06-12 | 1 | -1/+2 |
| | | | | | | [#2797 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵ | Joshua Peek | 2009-05-28 | 1 | -1/+1 |
| | | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern. | ||||
* | Implement #many? for NamedScope and AssociationCollection using #size [#1500 ↵ | Chris Kampmeier | 2009-05-17 | 1 | -1/+10 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Cherry-pick core extensions | Jeremy Kemper | 2009-05-13 | 1 | -0/+3 |
| | |||||
* | Use DependencyModule for included hooks in ActiveRecord | Bryan Helmkamp | 2009-05-11 | 1 | -5/+4 |
| | |||||
* | Default scope :order should be overridden by named scopes. | Alexander Podgorbunsky | 2009-05-01 | 1 | -2/+2 |
| | | | | | | [#2346 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Returning nil from named scope lambda is equivalent to an empty hash [#1773 ↵ | Elijah Miller | 2009-03-12 | 1 | -0/+1 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure nested with_scope merges conditions inside out [#2193 state:resolved] | Manfred Stienstra | 2009-03-10 | 1 | -2/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Methods invoked within named scope Procs should respect the scope stack. ↵ | jvoorhis | 2009-03-06 | 1 | -1/+6 |
| | | | | | | [#1267 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Update rdoc: all is not a named_scope [#1959 state:committed] | Zack Hobson | 2009-02-27 | 1 | -2/+3 |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | ||||
* | Fixed bug that makes named_scopes _forgot_ current scope | Diego Algorta | 2009-02-25 | 1 | -2/+11 |
| | |||||
* | Merge docrails | Pratik Naik | 2009-01-18 | 1 | -1/+1 |
| | |||||
* | Merge docrails | Pratik Naik | 2008-09-03 | 1 | -13/+13 |
| | |||||
* | Make NamedScope#size behave identically to AssociationCollection#size. [#933 ↵ | Tom Stuart | 2008-08-29 | 1 | -1/+5 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | 1.9: methods need to be coerced into strings | Joshua Peek | 2008-08-29 | 1 | -1/+1 |
| | |||||
* | Use a set for the named scope methods not a big regexp. | Michael Koziarski | 2008-08-29 | 1 | -2/+2 |
| | |||||
* | Fix NamedScope regex so methods containing "an" get delegated to ↵ | Jan De Poorter | 2008-08-29 | 1 | -1/+1 |
| | | | | | | proxy_found. [#901 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix incorrect signature for NamedScope#respond_to? [#852 state:resolved] | Tom Lea | 2008-08-21 | 1 | -2/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Support find_all on named scopes. [#730 state:resolved] | Ryan Bates | 2008-08-21 | 1 | -1/+1 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix ActiveRecord::NamedScope::Scope#respond_to? [#818 state:resolved] | Eloy Duran | 2008-08-13 | 1 | -1/+5 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure NamedScope#any? uses COUNT query wherever possible. [#680 state:resolved] | Jan De Poorter | 2008-07-23 | 1 | -1/+9 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure NamedScope#build/create/create!/new works as expected when named ↵ | Daniel Guettler | 2008-07-09 | 1 | -1/+2 |
| | | | | | | scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fixed that scopes defined with a string name could not be composed | Tarmo Tänav | 2008-06-22 | 1 | -0/+1 |
| | |||||
* | Ensure named_scope#empty? uses count query. [#262 state:resolved] | Ryan Bates | 2008-05-28 | 1 | -1/+5 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge docrails. | Pratik Naik | 2008-05-25 | 1 | -4/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add first/last methods to associations/named_scope. [#226 state:resolved] | Ryan Bates | 2008-05-20 | 1 | -1/+23 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | - Updated tzinfo to use Rational() instead of Rational.new! due to "private ↵ | Nate Wiger | 2008-05-19 | 1 | -2/+2 |
| | | | | | | method new!" in Ruby 1.9 - Added ^object_id$ as ignore pattern to fixing "redefining object_id" issue in Ruby 1.9 Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add test for named_scope#proxy_options. [#97 state:resolved] | Duncan Beevers | 2008-05-11 | 1 | -0/+12 |
| | |||||
* | Let Base.all use conditions etc like first/last | David Heinemeier Hansson | 2008-04-28 | 1 | -1/+0 |
| | |||||
* | Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen] | Rick Olson | 2008-03-24 | 1 | -0/+128 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |