Displaying 1 result from an estimated 1 matches for "find_by_conten".
Did you mean:
find_by_content
2006 Oct 02
6
Strange Sorting Issues
Hi there,
I''m having some strange sorting stuff goign on. Here''s my search method:
sort_fields = []
sort_fields << Ferret::Search::SortField.new("name",
:reverse => :false)
@results = Listing.find_by_contents @search_criteria, :limit => :all,
:sort => sort_fields
page = (params[:page] ||= 1).to_i
items_per_page = 9
offset = (page - 1) * items_per_page
@pages = Paginator.new(self, @results.length, items_per_page, page)
@results = @results[offset..(offset + items_per_page - 1)]
For some qu...