Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated docs for new release with jney's ordered updates

  • Loading branch information...
commit 849ae98a25762b34b50d21aff7b0bff87b428db5 1 parent 8d51af9
@rwdaigle rwdaigle authored
Showing with 10 additions and 5 deletions.
  1. +4 −0 CHANGELOG
  2. +4 −3 README.textile
  3. +2 −2 utility_scopes.gemspec
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+0.2.2
+
+* More flexible @ordered@ syntax (by jney - http://github.com/jney)
+
0.2.1
* Fixed except named scope not correctly determining its base class
View
7 README.textile
@@ -110,14 +110,15 @@ h3. Ordered
_Note: the @ordered@ scope cannot be chained with any other @order@ clauses_
@ordered@ lets you dynamically specify the ordering of your result set. If no
-arguments are given it will default to @created_at DESC@:
+arguments are given it will default to @created_at DESC@. (@ordered@ is also
+available as @order_by@ and @sort_by@)
Article.ordered # Get all articles ordered by "created_at DESC"
Article.ordered(:id) # Get all articles ordered by "id"
Article.ordered("rank ASC") # Get all articles ordered by "rank ASC"
Article.order_by(:id) # order_by and sort_by are alias to ordered
- Article.order_by([:id, :desc], :popularity) # can take a array as parameter
- Article.order_by(:id => :desc, :popularity => :asc) # can take a hash as parameter
+ Article.order_by([:id, :desc], :popularity) # can take a two-element array as parameter
+ Article.sort_by(:id => :desc, :popularity => :asc) # can take a hash as parameter
# only available for jruby/ruby 1.9
Article.order_by_id # can be set as a sentence
View
4 utility_scopes.gemspec
@@ -1,8 +1,8 @@
Gem::Specification.new do |s|
s.name = "utility_scopes"
- s.version = "0.2.1"
- s.date = "2008-09-08"
+ s.version = "0.2.2"
+ s.date = "2008-10-28"
s.summary = "A collection of utilitarian named scopes providing common functionality for ActiveRecord models"
s.email = "ryan@yfactorial.com"
Please sign in to comment.
Something went wrong with that request. Please try again.