similar to: Re: Rails Digest, Vol 16, Issue 132

Displaying 20 results from an estimated 20000 matches similar to: "Re: Rails Digest, Vol 16, Issue 132"

2006 Jan 31
6
Pagination - why is it this hard?
Hi everyone, I''m at the end of my rope on this. I can''t get pagination to work with anything but a standard find on a model. If I try to do a search and customize the pagination, I get lots of different variations. My thought was to have the list action do what it does, but to pass it a list of search conditions from the search action. So, if search determines that we need
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 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
2006 Jan 27
5
Newbie:Adding a new Table-Strange Error
Hi Everybody, I am a newbie in this list so please forgive me if this is a lengthy message. Currently I am working on a project at my work place that includes viewing some oracle tables(I do not have control over to rewrite the tables) and searching the tables based on a given criteria with Rails. Up untill now everything was working great. The database consists of a lot of tables but I was
2007 Oct 15
3
NoMethodError
Hi to all!! I am new to ruby. I am trying to write a program to fetch the data from Database and written the data using pagination. I could get the data from DB. but pagination is not working. When i see the log file it is showing the following error. NoMethodError: undefined method ''paginatior'' #<Hash...> my pginate.rb and pagination.rb files are not in the same folder
2006 Jan 30
9
error when adding a new table to the existing application
Deniz wrote: > Hi Everybody, > I am a newbie in this list so please forgive me if this is a lengthy > message. > Currently I am working on a project at my work place that includes > viewing some oracle tables(I do not have control over to rewrite the > tables) and searching the tables based on a given criteria with Rails. > Up untill now everything was working great. The
2006 Jun 07
3
Pagination
Does anyone know if there''s a plugin to do pagination numbers like: Prev 1 2 3 4 5 etc Next And automatically move through the pages? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Jan 24
1
Pagination
Hello, maybe that I''m a stupid, but I don''t know how I can working with pagination. In all examples is written (for example) next: def user_list @user_pages, @users = paginate(:users, :order_by => ''name'') end So, it''s OK (as a scaffold) for all set of users. But I need a little other functionality. For example I need paginate only a little bit
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 Mar 21
2
Rails newbie can''t initialize a new Paginator object
Hi all, I''m using ruby 1.8.2-15 and a recent rails 1.0 download. I''m trying to implement the Classic/Custom pagination in a list action. Here''s my code: def list getSearchTerms # NOTE: @params[:search_results] is an Array of product_data objects # returned by a search action. @results = @params[:search_results] if @results.nil? then # The default
2005 Dec 29
1
Paginate do a Count(*) request before...
Mathieu, Paginate needs to know how many total records there are when you create the object so you must either do an SQL COUNT or get all the records and find the length of the array. If it''s a small data set, I say find them all once and save yourself the second SQL query. If it''s a large data set do the COUNT and then only find the records you want which will save
2006 Jan 06
2
Paginate from a difficult sql query
Hello, I have 2 tables table colors : +----------------------+ | id | user_id | name | +----------------------+ | 1 | 1 | test1 | | 2 | 2 | test2 | | 3 | 3 | test3 | +----------------------+ table users : +----------------------+ | id | enabled | name | +----------------------+ | 1 | 1 | bob | | 2 | 1
2006 Feb 23
6
Search Forms with Pagination
Hi there everyone, I''ve recently moved to RoR and am still struggling with the basics of what used to be second nature in php, so on with my question: I have a database with products, and I need to create a search form that paginates the results. What I have so far in my controller is: def list # If the values are nil, then set them, otherwise wrap them in % # Also,
2011 Dec 07
5
Find_by_sql help?
How to make it work with paginator (kaminari)? MySQL and full text search: Words (id, word) @words = Word.find_by_sql(["SELECT id, word, MATCH (word) AGAINST (?) AS Score FROM words WHERE MATCH (word) AGAINST (?) ORDER BY Score Desc, word!=?", params[:search],params[:search],params[:search]]) I can''t add .page(params[:page]).per(5) to the end of "find_by_sql()" so
2009 Jul 23
1
How can I paginate records find by using find_by_sql
Hello everyone, I forced to use @user = User.find_by_sql sql_query in a particular situation in my project. Now I want to paginate the records. How can I paginate the records? Please help me. Thanks in advance -- Posted via http://www.ruby-forum.com/.
2007 Dec 06
1
Testing find_by_sql
Hi all, I have a controller method that, given some parameters, constructs a big sql query and passes it to find_by_sql (with pagination). The point is that I can''t wonder how to write a functional test for this method. Has anyone passed already through this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Jun 05
2
Pagination, how to in rails?
Hi, Im creating a few reports for a system using ind_by_sql Are there any built in features that I can use to paginate the results and how can this be achived? Thanks -- Posted via http://www.ruby-forum.com/.
2006 Apr 10
9
Pagination with letter (A B C D ... Z)
Hi there, Is there a neat and easy way to implement pagination with letters rather than numbers eg : A B C D ... Z Rob
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 Jul 16
3
pagination over custom-sorted collections?
I have a little web app where we need to paginate collections of items. I''m trying to sort the collection and then pass it, sorted, to a Paginator, and still be able to paginate through the collection, across several pages, with the new sort order. The only thing I''m doing differently from the regular scaffolding approach is this: @order_pages = Paginator.new(self,