search for: listing_pag

Displaying 4 results from an estimated 4 matches for "listing_pag".

Did you mean: listing_pages
2006 Aug 15
2
Working with user data
...ave the authentication working correctly. I started by generating scaffolding for a model named "listing". Each user will have their own listings. The Listing model belongs_to user and of course User has_many listings. The scaffolding for ListingsController made this: def list @listing_pages, @listings = paginate :listings, :per_page => 10 end Simple enough, but this shows all listings from any user of course. I''m able to get it to work as I want by changing it to this: def list @listings = current_user.listings @listing_pages = Paginator.new self, @listing...
2006 Jun 10
1
paginate session problem.. (syntax question)
...et it to paginate correctly.. Is there a trick to do something like this? There are a few others at www.rubyonrailsforum.com that are having the same issue. Any insite would be great, thanks in advance! def display_location if params[:search] && params[:search].size > 0 @listing_pages, @listings = paginate (:listings, :per_page => 10, :order => "budget desc") locations = (params[:search] || {:default => "someplace"}).values.map{ |x| ''"'' + x + ''"'' } conditions = ''["s...
2006 Jun 11
0
mySQL paginate syntax question for complex SQL. (over 117 views in rubyonrailsforum and no answer, others confused..)
...do something like this? There are a few others at www.rubyonrailsforum.com that are having the same issue. Any incite would be great, thanks in advance! (over 117 views and no answer in rubyonrailsforum???) def display_location if params[:search] && params[:search].size > 0 @listing_pages, @listings = paginate (:listings, :per_page => 10, :order => "budget desc") locations = (params[:search] || {:default => "someplace"}).values.map{ |x| ''"'' + x + ''"'' } conditions = ''["stati...
2006 Jul 03
0
Pagination with acts_as_ferret
Hey there, Previous to finding ferret I had a test query setup to do pagination like: @listing_pages, @listings = paginate(:listing, :per_page => 10, :conditions => [" name LIKE ? ", "%" + search_criteria + "%"], :order_by => "name ASC") Can I do similar pagination with @results array returned from a ferret query?...