README.rdoc in sunspot_rails-2.0.0.pre.111215 vs README.rdoc in sunspot_rails-2.0.0.pre.120415
- old
+ new
@@ -141,11 +141,11 @@
Do it like this:
Post.search do
with :blog_id, 1
with(:updated_at).greater_than(Time.now - 2.weeks)
- order :sort_title, :asc
+ order_by :sort_title, :asc
paginate :page => 1, :per_page => 15
end
See the documentation for <code>Sunspot.search</code> for all the options
available in the search block, and the information available in the result
@@ -166,10 +166,10 @@
provide any additional support for this, since there is not anything useful to
be added, so just use the interface provided by Sunspot:
Sunspot.search(Post, Comment) do
with :blog_id, 1
- order :created_at, :asc
+ order_by :created_at, :asc
end
Be sure to check out the Sunspot documentation for all the details.
=== Adding search functionality in mixins