similar to: Paginating Problema :(

Displaying 20 results from an estimated 10000 matches similar to: "Paginating Problema :("

2007 Feb 10
2
Ferret and Paginating Find
Hey all, I''ve been really happy with ferret thus far and all my search on my site is based on it. One of the recent challenges I ran into is changing some of my pagination within my site. Until now, I just used the tutorials out there that talk about how to get pagination working with acts_as_ferret. Recently, I decided to change my pagination to begin using the "Paginating
2006 Jul 26
4
can you pass data when you render :action
how can i do: render :action => "headline", :id => @user.id Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 19
4
Using Application.rhtml as layout for all controllers
I put my nav system in application layout. that way any controller loading will have the nav system. I have one problem though - the <%= yield %> is in the body, so how would my controllers specify other css files? my application layout would look like this: <html> <head> title css include javascript include </head> <body> nav system <%=yield%>
2006 Jul 18
3
Navigation techniques, everyone?
I''m rewriting the code to my first app. I want to reuse a lot of it, but tidy it up a lot. The first thing I will tackle is my nav-bar. Throughout a user''s experience on my app, I want it to reload as little as possible (I''ll have about 7 or 8 controllers with about 70 actions). So, I''ve thought of a few ways of doing it, and was wondering if you guys
2006 Jul 27
3
How do I update a div''s content in the controller?
Without using an RJS, is there a call I can do in the controller? All I want to do is this statement, but in the controller: new Effect.toggle(''notifier_nav'',''appear'', {duration:12.0}); Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2007 Apr 04
2
[PLUGIN] ArPaginator - Allows you to easily paginate over any existing AR queries.
The built-in Rails pagination is fairly limited...you pass in the model name, and optionally some conditions, and it generates a paginated query for you. This gets to be very bad if you''ve got any custom queries. class Company < ActiveRecord::Base def complete_videos Video.find :all, :conditions => "company_id=#{id} AND status=''complete''", :order
2006 Jul 20
7
How do you use :message with validation?
If I do validates_uniqueness_of :name, :message => "It''s not uniqueeee!!!" then how do I have it display that message when the check fails? -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jun 21
3
Call action & display nothing?
Can you do a periodically_call_remote to an action but then not display any new view? say the new action was called ADD. I don''t want to do an rhtml file for add, and I don''t want to render anything in the controller... I want to leave the page as it is. How is this done? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there, I''ve been trying to paginate over a list of members that all share a tag in common using the acts_as_taggable plugin. The regular way of paginating over a collection doesn''t seem to work with acts_as_taggable. Here''s what my method looks like that takes in a tag name, finds all the members that share the tag and then displays all the members. Nothing too fancy
2006 Jul 19
2
Mouse Location
Is the only way to get the mouse location by using javascript? Or does rails do it for me?!? :) Does anyone have a simple script that they use? I''m trying to put a div right where the mouse is clicked on a link... so I''m looking for it to work like this: a hre f=. onclick=Element.setStyle(''title_login'', {left: MOUSEX,top: MOUSEY;});new
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,
2006 Aug 10
4
How to upload all images in a folder?
Instead of making a form to upload one picture at a time, I''d like to have the File Column plugin accept a directory, and have each picture be uploaded and thumbnails created (w/ RMagick). Has anyone done this? Anyone have a good idea where to start if I were to do it on my own? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
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|
2006 Jul 25
11
Prevent users from entering urls
How could I make it so that links on my page could link to a controllers action, but if the user manually entered the url, it would redirect them back to the main page? Is this possible? Thank you, -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
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 Jul 17
7
Ajax Tabbed Browsing
I was wondering if anyone has done this, namely make tabbed browsing exactly like a web browser, but have it within the page. I would like to make a search function that updates a section of the page with the results, as well as makes a new tab that displays those search results. Then, if a user did 5 searches, there would be 5 tabs. Each tab would hide the other 4 results and show the
2008 Dec 09
2
paginating_find losing scope
Hello, I''m having a problem with paginating_find losing the context of the array it''s paginating. For example, URL: http://localhost:3000/companies/1/users/1 <% @tickets = @user.tickets.find(:all, page => {:size => 10, :current => params[:page]}) %> <% for ticket in @tickets %> ... <% end %> <%= paginating_links (@tickets) %>
2008 Mar 06
1
pagination for an object array
def show_details @sd_ticket = ServiceDeskTicket.find(params[:id]) @servicedesk_cis = @sd_ticket.service_desk_cis end What I need is a pagination for @servicedesk_cis using the custom pagination..How can i give offset and limit to this? I have successfully done previously custom pagination in another def as below def search_sd_ticket @search_sd_ui_hash=params[:sd_ticket]
2006 Jun 15
1
Paginating a .find
how exactly would I apply paginate to a .find I have: @posts = Post.find(:all, :conditions => [ ''(title) OR (body) LIKE ?'', ''%'' + params[:query] + ''%''], :order => ''end_date'') How would I go about paginating the uoputed list? Something like 10 on a page. -- Posted via
2006 Aug 11
5
Why does no one like render_component?
Maybe I''m missing the point? Lets take for example albums of pictures. If I have a scaffold for each, and I''m showing an album, what if I want to list all of the pictures that are in the album? Surely, I''d want to call the List action in the picture controller. render_component would do this perfectly. But we''re told not to use render_component. So