similar to: Pagination Question

Displaying 20 results from an estimated 5000 matches similar to: "Pagination Question"

2006 Jan 04
1
Autocomplete howto?
On 3 Jan 2006, at 20:00, rails-request@lists.rubyonrails.org wrote: >def auto_complete_for_dealing_which_store > search = params[:dealing][:which_store] > @stores = Dealing.search(search) unless search.blank? > render :partial => ''live_search'' >end > >and my entire partial: ><ul class="autocomplete_list"> ><% for
2006 Apr 13
7
Complex SQL in paginate command?
Hi all, Is there a way to create pagination with a complex SQL, more complex than the :conditions option will support? I have two databases, houses and images. Houses has_many images, and each Image belongs_to house. I''m creating a search engine for the house records and I''d like to be able to filter out all the houses without any associated images. So far I''m
2006 Aug 14
5
Tutorial for Queries
Hi! I''m looking for a good tutorial that explains the main points of performing queries with Rails. I do have AWDWR and have read the section on ''find'' but I''m looking for something that goes into more detail on how to perform queries across tables. Abstracted from my current application, this is an example: * person has_many sites * site has_one room *
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users
2006 Jan 03
2
Scaffolding - changing number of records per page
People, This is probably simple but I couldn''t find where to change the default 10 records per page for scaffolding . . Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:(0)411-185-652 Fax: +61:(0)2-8221-9599 E-mail: phil@pricom.com.au
2006 Aug 04
8
I need an idea !
Hello here, I need to find an idea to solve a problem I manage Events which are of kind :arrival or :departure At first the two kind of events was unrelated but my client want to see the :departure belonging to the :arrival and vice versa. I''m searching for a solution to implement this ''link''. I''ve thought about an integer column containing an uniq id for
2006 Feb 08
2
What page is an item on?
Using the paginator helper, is there a way to determine what page an item in the collection is on? Thanks in advance for your help!
2006 May 23
5
Wierd pagination problem - Unknown options: order?
I am trying to use pagination with the order option. I am following examples I''ve seen all over the web, but I am getting an error. My code seems simple: def list @upload_pages, @uploads = paginate :uploads, :per_page => 20, :order => ''id'' end Yet I keep getting this error: ___________________________________________
2006 May 23
3
Pagination problem
hi everybody, i am new to rails.. plz clear my doubt... this is my question In my table(public_topics), i have 11 rows of data.. whenever i run the following view, it shows the entire rows in the current page.. and i have set the '':per_page'' option to ''2''.so it must show two data per page..but it shows all the rows in a single page..and this case continue
2008 Feb 29
7
Moving pagination to the Model
I''m using will_paginate in a Post class method; [code]def self.list(page) paginate :per_page => 10, :page => page, :include => :user end[/code] I can happily use the method on my posts controller index action; [code] class PostsController < ApplicationController def index @posts = Post.list(params[:page]) respond_to do |format|
2009 Aug 18
4
pagination problem....
Hi, please help... In controller... def index @customers = Customer.find(:all) pagination code here.... end In index.html.erb Displayes list of customers and has pagination 1,2,3,4...etc. On clicking page 2, it will again run this(Customer.find(:all)) query in controller. So, there will be lack of performance. So, how to increase the mysql performace? Can i use the index as below or any
2006 Apr 04
2
Pagination and Parent Conditions
Can I do any "fancy" conditionals when using the Pagination helper? The problem is that I want to be able to specify a conditional based on the criteria of a parent object. Here''s an example: Object A has_many Object B''s I want to paginate through 100 B''s but I *only* want it to return the ones who''s A.flag = true I poked around through the Wiki
2006 Feb 13
1
another simple question: per_page in pagination
Hi, Why can''t I use a variable to specify the :per_page attribute when using the most basic form of pagination? (if I use a hardcode number, it runs) What did I do? Thx. My code: def list_orders page_size = 20 ... order_pages, @orders = paginate(:orders, :per_page => page_size) end My Errors: undefined method `>'' for false:FalseClass RAILS_ROOT:
2006 Aug 07
4
Problem with Pagination
Hi Guys, I am trying to paginate the results from a search. When I use actual constants in the search conditions, it works fine: def query @k2_result_pages, @k2_results = paginate (:k2_results, :conditions => [''e_date >= ? AND e_date <= ?'', ''2006-07-12'', ''2006-08-12''],
2006 Feb 01
1
Rails pagination problem
I am having this problem with pagination query in my controller class. I am using SQL server and following code to create pagination fails, complains about column name ''program_name'' (which is valid column/attribute of program) The error message is: DBI::DatabaseError: S0022 (207) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
2006 Mar 31
4
Question about pagination
Hi! I''ve got a list of project on the main page and if one of them is selected i render a partial using ajax with data of selected project. How to create links to next/previous project using pagination? -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
6
pagination question
i''ve figured out how to use the next and previous links with the paginator class but now i''m trying to figure out how to display all the page numbers in between. looking through the rails api, i found paginator.each() but i''m not sure how to use it, or if that''s even what i am looking for. also, is there a way to limit the amount of pages like some sites
2006 Mar 13
1
Pagination & Feedtools
Is it possible to paginate rss feeds with FeedTools. The following code generates an error about constants. latest_feeds = FeedTools::Feed.open(''http://feeds.feedburner.com/Eribium'') @news_pages, @pages = paginate :latest_feeds, :per_page => 5 -- Posted via http://www.ruby-forum.com/.
2006 Aug 03
5
Strategy for persisting row filter variables in pagination?
I have my list view filtering rows shown within the table <tr> tags like most of the introductory tutorials do. As I''m adding a few dozen entries I''m noticing the standard scaffolding pagination doesn''t pick up the number of rows from the filter since it is not being passed the number of rows returned within the scope of the filter statement. >From a
2006 Jul 11
1
Has And Belongs To Many and Pagination
I''m struggling with the issue of pagination and many to many relationships. I have products and categories (a many to many relationship.) When I go to a category page, I wish to load all products associated with that category and have pagination of the products. @category_products = @category.products gives me all the products associated with the category however, when I try to