similar to: Paginating a fetched resultset problems with next/previous

Displaying 20 results from an estimated 1000 matches similar to: "Paginating a fetched resultset problems with next/previous"

2006 Jul 31
9
Multiple Pagination
I have the following: def index begin @restaurant_pages, @restaurants = paginate :restaurants, :order => (params[ :sort ] || "name"), :per_page => 2 @cuisines = Cuisine.find_all rescue redirect_to :action => :index end end # sort by cuisine def
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
2007 Oct 03
3
Pagination problem with acts_as_ferret
Hi, am using this wonderful plugin acts_as_ferret and according to the tutorial at http://railsenvy.com/2007/2/19/acts-as- ? rial#basic I worked it out except the pagination feature. If I have 12 records and I give limit to 10, its correctly displaying 10 records in the first page and is giving the link to the second page too. But when I go to the next page I find the same 10 records instead of
2007 May 10
5
Pagination has many through problems
I have searched for days for an example that demonstrates what i would like to do, and this morning i thought i''d worked it out, but no....here''s what i have: Controller ========== class ProfilesController < ApplicationController def friends current_user.profile.friends end def list_friends @profile_pages, @profiles = paginate( friends, :per_page => 10) end end
2006 Mar 05
0
Pagination Question [Tagging: find_tagged_with]
Hello experts, I am trying to paginate the following query but no matter what I try I am unable to paginate it. In controller I have: q_webpages=Webpage.find_tagged_with(:any => params[:tag], :separator=>'','', :order=>''updated_at DESC'') @webpage_pages, @webpages = paginate_collection(:collection=>q_webpages)
2013 Jul 26
0
variación en los resultados de k medias (Alfredo Alvarez)
Hola, pues con esto del kmeans ando pegándome ahora y si quieres tener los mismos resultados para los mismos datos de entrada debes darle una semilla constante en cada ejecución: set.seed(1234) Como se explica aquí: https://stat.ethz.ch/pipermail/r-help/2007-March/128671.html Lo he comprobado en muchas ejecuciones y es así. Otra posibilidad que se menciona también en las consultas que he
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,
2007 Sep 05
1
AAF and DRb with highlighting
How would I change this method in order to get highlighting working with DRb? I''ve given up on searching on Google, I''m getting no results that are actually helpful. def self.find_storage_by_contents(query, options = {}) # Get the index that acts_as_ferret created for us index = self.aaf_index.ferret_index results = [] default_options = {:limit => 10,
2001 Mar 10
0
patch to add device-option to ogg123 rc file
Below is a patch for vorbis-tools-1.0beta4 ogg123. It adds support for using the rc file (like /etc/ogg123.rc) for configuring the device-options. In addition, comments can be used (when they start a line). My ~/.ogg123rc: default_device=oss default_options=dsp:/dev/audio Please share your comments. Jeremy C. Reed http://www.reedmedia.net/ diff -u
2013 Jan 25
0
Resumen de R-help-es, Vol 47, Envío 46
Hola, Paulina, Desde luego poderse se puede, leer, manipular y analizar ese conjunto de datos en R incluso en equipos relativamente modestos. Hay multitud de soluciones y todo depende tanto del tipo de datos que quieres leer como de las manipulaciones que quieres hacer con ellos. Algunas preguntas para guiar estas recomendaciones serían: - ¿Tienes que tener todos los datos simultáneamente en
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
In my model Topic: acts_as_ferret({ :fields => {:username => {:store => :yes, :boost => 30}, :subject => {:store => :yes, :boost => 20}, :body => {:store => :yes, :boost => 10}}, :remote => true }, { :analyzer => Ferret::Analysis::RegExpAnalyzer.new(/./, false) }) def self.full_text_search(q, options = {}, find_options = {}) return nil if q.nil? or
2013 Jun 26
1
Resumen de R-help-es, Vol 52, Envío 33
Hola, Las presentaciones de la sesión sobre ecuaciones estructurales (SEM) así como los vídeos -como ya anunció Carlos ayer- están subidos a la página del Grupo de Madrid: http://r-es.org/Grupo+de+Inter%C3%A9s+Local+de+Madrid+-+GIL+Madrid Saludos! -- Pedro Concejero BigData - Analytics @ Telefónica I+D<http://www.tid.es/es/Paginas/default.aspx> Part of Telefónica
2006 Jul 27
0
Override default Rail Generator options
I''ve been hacking at this for hours now. I found a method called ''default_options'' in Rails::Generator::Base. By default it calls ''default_options :collision => :ask, :quiet => false''. I''d like to over ride it with my own options. It works if I just change it in the Rails source but thats not a real solution. Is there any way to set
2006 Feb 27
0
Simple Namespace Question
I put the following code into my application_helper.rb file, which will allow super fancy ajax pagination blah blah blah. Now the problem is, it''s not being identified. I''m running Rails 1.0.0, and froze edge, so it''s sitting in /vendor. The actual pagination_helper.rb file is appropriately sitting in: /vendor/rails/actionpack/lib/action_view/helpers
2012 Jan 25
0
Paperclip preserve files ?
Hi, I am using paperclip to upload files. The problem I am facing is, based on my object property I need to preserve my file. Means my object should be deleted from db but the file need to be restored. I am using the option :preserve_files => true. If I keep the above option in model it will be access to all the objects of the model. I need to restore only for limited objects.
2009 Feb 03
1
Passing args to generator
I have some default_options in generator and when I wish to change they value with --option_name I get only logical true instead of string ... default_options :option_name => "Some string" ... def add_options!(opt) opt.separator '''' opt.separator ''Options:'' opt.on("--option_name","Some Text") { |v| options[:option_name] = v
2013 Oct 29
1
Hoy reunión del "Grupo de Usuarios de R de Madrid - martes 29-octubre"
Para los perezosos como yo, para el talleR de mapas hoy en Madrid: install.packages(c("maps", "sp", "maptools", "rgdal", "rgeos", "mapproj", "RgoogleMaps", "plotGoogleMaps",
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
2007 Jul 18
5
Strange search result with conditions in find_by_contents
Hi, guys: Strange search result with conditions in find_by_contents! first of all, i''ve installed the acts_as_ferret to my project vender folder by ''ruby script/plugin install svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret'' in my SearchController def searchforum if !params[:doSearch].nil? if params[:searchTerms].nil? || params[:searchTerms] ==
2005 Jun 07
0
Ruby/Odeum 0.4: ResultSets, KirbyBase Demo
Hello, An announcement for another version of Ruby/Odeum 0.4. http://www.zedshaw.com/projects/ruby_odeum/index.html http://www.zedshaw.com/downloads/ruby_odeum/ruby_odeum-0.4.tar.bz2 http://www.zedshaw.com/downloads/ruby_odeum/ruby_odeum-0.4.gem ***This release will break your existing code.*** Read the ResultSet documentation for how to make your changes. Important features of this release