public
Fork of mislav/will_paginate
Description: Most awesome pagination solution for Rails
Homepage: http://github.com/mislav/will_paginate/wikis
Clone URL: git://github.com/technoweenie/will_paginate.git
Doc love: tweak the section about importance of ordering
mislav (author)
Sat Feb 23 16:22:57 -0800 2008
commit  578e81baf1c0bf3eb26fee740f0a2ddff52d7670
tree    4f4663000cda9f496b59278815fa77f5374d82a3
parent  e1cde937783de11aedd66693cc5017515e0a6f76
...
39
40
41
42
43
44
45
46
47
 
 
 
 
 
 
 
 
 
 
48
49
50
...
39
40
41
 
 
 
 
 
 
42
43
44
45
46
47
48
49
50
51
52
53
54
0
@@ -39,12 +39,16 @@ module WillPaginate
0
     #
0
     # == The importance of the <tt>:order</tt> parameter
0
     #
0
- # In ActiveRecord finders, <tt>:order</tt> parameter specifies columns for the
0
- # <tt>ORDER BY</tt> clause in SQL. It is important to have it, since pagination only makes
0
- # sense with ordered sets. Without the <tt>ORDER BY</tt> clause, databases aren't required
0
- # to do consistent ordering when performing <tt>SELECT</tt> queries; this is especially true
0
- # for PostgreSQL.
0
- #
0
+ # In ActiveRecord finders, <tt>:order</tt> parameter specifies columns for
0
+ # the <tt>ORDER BY</tt> clause in SQL. It is important to have it, since
0
+ # pagination only makes sense with ordered sets. Without the <tt>ORDER
0
+ # BY</tt> clause, databases aren't required to do consistent ordering when
0
+ # performing <tt>SELECT</tt> queries; this is especially true for
0
+ # PostgreSQL.
0
+ #
0
+ # Therefore, make sure you are doing ordering on a column that makes the
0
+ # most sense in the current context. Make that obvious to the user, also.
0
+ # For perfomance reasons you will also want to add an index to that column.
0
     module ClassMethods
0
       # This is the main paginating finder.
0
       #

Comments

    No one has commented yet.