Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵ | Xavier Noria | 2010-04-05 | 1 | -1/+1 |
| | | | | there, same for #class_eval to simplify, and adds coverage for class_eval | ||||
* | Improve scope docs | Pratik Naik | 2010-04-03 | 1 | -30/+14 |
| | |||||
* | Improve named scope lambda | Pratik Naik | 2010-04-03 | 1 | -13/+4 |
| | |||||
* | Remove unnecessary argument for creating scopes | Pratik Naik | 2010-04-03 | 1 | -4/+4 |
| | |||||
* | Goodbye ActiveRecord::NamedScope::Scope | Pratik Naik | 2010-04-02 | 1 | -35/+17 |
| | |||||
* | Make Relation#first and Relation#last behave like named scope's | Pratik Naik | 2010-04-02 | 1 | -16/+0 |
| | |||||
* | Scope#method_missing can safely rely on Relation#method_missing | Pratik Naik | 2010-04-02 | 1 | -10/+0 |
| | |||||
* | Scope#current_scoped_methods_when_defined is no longer needed | Pratik Naik | 2010-04-02 | 1 | -13/+2 |
| | |||||
* | Add Relation extensions | Pratik Naik | 2010-04-02 | 1 | -5/+2 |
| | |||||
* | Named scopes shouldn't test equality using to_a if it's not an Array, this ↵ | Emilio Tagua | 2010-03-30 | 1 | -1/+8 |
| | | | | | | was causing records to be loaded before they were needed. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | defining a named_scope which overwrites an existing method is now allowed we ↵ | Matthew Rudy Jacobs | 2010-03-28 | 1 | -1/+2 |
| | | | | | | | | | just log a warning. This was motivated by the fact that :open is defined on all classes as such the named_scope "open" can never be used, without hacking ActiveRecord with an "undef_method" [#4083 state:resolved] Signed-off-by: wycats <wycats@gmail.com> | ||||
* | adds missing requires for Object#blank? and Object#present? | Xavier Noria | 2010-03-28 | 1 | -0/+1 |
| | |||||
* | removing spawn from SpawnMethods | Aaron Patterson | 2010-03-10 | 1 | -1/+1 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice. | Jeremy Kemper | 2010-02-25 | 1 | -2/+2 |
| | |||||
* | Fix AP's AR integration tests warning | Pratik Naik | 2010-01-20 | 1 | -1/+1 |
| | |||||
* | Scope#find is no longer needed now that Relation#find handles all the cases | Pratik Naik | 2010-01-20 | 1 | -12/+0 |
| | |||||
* | Named scopes dont need count() now that Relation#count handles all the cases | Pratik Naik | 2010-01-20 | 1 | -5/+0 |
| | |||||
* | Fix the named scope equality check | Pratik Naik | 2010-01-19 | 1 | -1/+1 |
| | |||||
* | Cleanup deprecation notices. | Joshua Peek | 2010-01-18 | 1 | -4/+4 |
| | |||||
* | Forgot to change named_scope to scope in an ArgumentError raise exception ↵ | Paco Guzman | 2010-01-18 | 1 | -1/+1 |
| | | | | | | for duplication scopes related to commit d60bb0a9e4be [#3736 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix the named_scope deprecation notice | Pratik Naik | 2010-01-18 | 1 | -1/+1 |
| | |||||
* | Rename named_scope to scope | Pratik Naik | 2010-01-18 | 1 | -7/+12 |
| | |||||
* | Inherit named scope class Scope from Relation | Pratik Naik | 2010-01-18 | 1 | -76/+42 |
| | |||||
* | Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too. | Pratik Naik | 2010-01-18 | 1 | -22/+16 |
| | |||||
* | Make relations work as scopes | Pratik Naik | 2010-01-17 | 1 | -5/+21 |
| | |||||
* | Make sure named_scope names are not used as method names already | Pratik Naik | 2010-01-17 | 1 | -0/+5 |
| | |||||
* | Use relations to build scope for named scopes | Pratik Naik | 2010-01-17 | 1 | -2/+7 |
| | |||||
* | Simplify Model.scoped definition | Pratik Naik | 2010-01-17 | 1 | -7/+1 |
| | |||||
* | Rename Model.active_relation to Model.unscoped | Pratik Naik | 2010-01-17 | 1 | -1/+1 |
| | |||||
* | Make sure Model#active_relation always adds STI conditions if needed | Pratik Naik | 2010-01-16 | 1 | -1/+1 |
| | |||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -2/+4 |
| | |||||
* | Get rid of Model.construct_finder_arel_with_includes. Use ↵ | Pratik Naik | 2010-01-03 | 1 | -1/+1 |
| | | | | construct_finder_arel instead | ||||
* | Rename Model.arel_table to Model.active_relation | Pratik Naik | 2010-01-02 | 1 | -1/+1 |
| | |||||
* | 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 |
| |