Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Corrected some typos and American vs. Queen's English issues | Lee Reilly | 2011-05-29 | 1 | -1/+1 |
| | |||||
* | Bring back some bits of documentation for scopes which were removed as part ↵ | Jon Leighton | 2011-04-17 | 1 | -1/+29 |
| | | | | of the reversion in 256b363 | ||||
* | Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via ↵ | Jon Leighton | 2011-04-17 | 1 | -60/+2 |
| | | | | | | | | | | the scope class method. Just define a class method yourself instead." This reverts commit f0e198bfa1e3f9689e0cde1d194a44027fc90b3c. Conflicts: activerecord/test/models/post.rb | ||||
* | Deprecate defining scopes with a callable (lambda, proc, etc) via the scope ↵ | Jon Leighton | 2011-04-12 | 1 | -2/+60 |
| | | | | class method. Just define a class method yourself instead. | ||||
* | ActiveRecord::Base.scopes hash is not needed | Jon Leighton | 2011-04-12 | 1 | -16/+4 |
| | |||||
* | Evaluate default scopes at the last possible moment in order to avoid ↵ | Jon Leighton | 2011-04-12 | 1 | -1/+7 |
| | | | | problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped. | ||||
* | Deprecated support for passing hashes and relations to default_scope, in ↵ | Jon Leighton | 2011-04-12 | 1 | -1/+1 |
| | | | | favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details. | ||||
* | Symbol to proc is preferred over longer form of map | Ryan Bigg | 2011-03-31 | 1 | -1/+1 |
| | |||||
* | Cleanup of named_scope documentation | Ryan Bigg | 2011-03-31 | 1 | -8/+9 |
| | |||||
* | Fix typo in named_scope documentation | Ryan Bigg | 2011-03-31 | 1 | -1/+1 |
| | |||||
* | add space to conform with style | Eadz | 2011-03-31 | 1 | -1/+1 |
| | |||||
* | Documented undocumented feature: Class methods on your model are ↵ | Eadz | 2011-03-31 | 1 | -0/+22 |
| | | | | automatically available on scopes | ||||
* | fixes: ActiveRecord::Base.scopes includes all scopes defined in all subclasses | Eric Allam | 2011-02-24 | 1 | -2/+3 |
| | |||||
* | class inheritable attributes is used no more! all internal use of class ↵ | Josh Kalderimis | 2010-11-20 | 1 | -4/+6 |
| | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | scopes can take an object that responds to `call` | Aaron Patterson | 2010-10-19 | 1 | -1/+1 |
| | |||||
* | avoid creating the proc object if possible | Aaron Patterson | 2010-10-19 | 1 | -2/+2 |
| | |||||
* | Cleanup deprecation warnings in active record | Carlos Antonio da Silva | 2010-09-06 | 1 | -5/+0 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -12/+12 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | commit review: applies guidelines to "# =>" | Xavier Noria | 2010-08-12 | 1 | -2/+2 |
| | |||||
* | updating documentation for named_scope and default_scope | Neeraj Singh | 2010-08-12 | 1 | -0/+9 |
| | |||||
* | ensuring that description does not exceed 100 columns | Neeraj Singh | 2010-08-02 | 1 | -9/+12 |
| | |||||
* | adding a reader for loaded, initializing @loaded to false | Aaron Patterson | 2010-07-20 | 1 | -1/+1 |
| | |||||
* | Make use of redefine_method, removed some more redefining warnings | Łukasz Strzałkowski | 2010-07-19 | 1 | -1/+1 |
| | |||||
* | Make relation a private method. | José Valim | 2010-07-01 | 1 | -1/+1 |
| | |||||
* | Add scoping and unscoped as the syntax to replace the old with_scope and ↵ | José Valim | 2010-06-29 | 1 | -11/+22 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts | ||||
* | All scopes are now cross-referenced. | Rizwan Reza | 2010-06-21 | 1 | -4/+4 |
| | |||||
* | Adds backslash to scope for cross-references. | Rizwan Reza | 2010-06-16 | 1 | -1/+1 |
| | |||||
* | Adds title and minor changes. | Rizwan Reza | 2010-06-16 | 1 | -4/+7 |
| | |||||
* | STI should not ignore type condition while applying scopes from parent class ↵ | Neeraj Singh | 2010-05-15 | 1 | -5/+1 |
| | | | | | | | | scopes [#4507 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | 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 |
| |