similar to: Display Options While Paginating

Displaying 20 results from an estimated 300 matches similar to: "Display Options While Paginating"

2011 Jan 08
1
Paperclip custom Interpolation in url
Folks, I have a simple model hierarchy (reduced to example as below) class Post < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to :post has_attached_file :photo, # :url => "/assets/class_cal/<original post date>/:id/:style/:basename.:extension" :url =>
2006 Apr 27
5
def list - paginate question
How do I adapt this code to only list articles made by the user logged into the session? def list @article_pages, @article = paginate :articles, :per_page => 10 end -- Posted via http://www.ruby-forum.com/.
2008 Jan 21
4
Caching CSS Issue
I have a problem I was hoping someone could shed some light on. I noticed that with every request to my server, the css file was being requested. I went ahead and made a static link to the css file so there is no query string at all, but still I see the requests coming in with each request. Do I need to do anything else (in the response header maybe?) to make sure that browsers will cache the
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys, 1. Which is the difference between this two methods? (select_datetime, datetime_select) 2. How I assign the selected date-time values, to an specific variable or array using select_datetime I know do it using datetime_select(''object'',''method'') I aprecciate your attention. Thanks PD: Sorry about my english.
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
2008 Jun 13
1
shallow over http or ftp not supported
I am trying to install a custom plugin in my Rails app: script/plugin install http://git.eyequeue.net/plugins/mt_capistrano.git Instead of installing the plugin, I get the following error: shallow over http or ftp not supported Any ideas on how to fix this? Is it OK to do a git clone in my vendor/ plugins directory? --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jan 04
5
help with link_to_if, I can''t make it work...
For the life of me I can''t get it to work. Here is an example of my syntax. I''m trying to make comment.name a link to comment.web_site only if there is a comment.web_site. Can someone please help? <%= link_to_if(comment.web_site.length > 0, comment.name, comment.web_site {"class" => "comment_by"}) %> -- Posted via
2003 Jan 24
1
WHITEHAT DISCOVERS SERIOUS SECURITY FLAW AFFECTING ALL WEB SERVER S WORLDWIDE
FYI, Santa Clara, Calif., Jan. 20, 2003 -- WhiteHat Security, Inc. a Santa Clara, California based company that specializes in Web Application Security, has discovered a serious security flaw affecting all web server world wide. From months of extensive research and testing, WhiteHat has found a way to exploit a flaw in the way all web servers communicate.
2003 Aug 19
1
for those of you who want a patent...
Alvaro Munoz (Hopkins Epi) is patenting the "diamond graph". http://www.jhsph.edu/Press_Room/Press_Releases/Munoz_diamond_graph.html There is enough prior art (hexagonal binning, among others) to make this amusing, except that it probably will get a patent. It's a reasonable graphical technique, but patentable? best, -tony -- A.J. Rossini rossini at u.washington.edu
2006 Jun 20
0
No opening form tag in rendered HTML
I cannot get my form to submit for my simple blog site (based on the "How to Build a Blog Engine in 15 Minutes" presentation) Any ideas? Thanks, Tom ---------------------------------------------------------------------------- Here is my code: #Post controller class PostsController < ApplicationController def index list render :action => ''list'' end
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
I am a relative RubNub and attempting to implement auth_generator v.2.0.1. I am getting an "undefined method `login_required'' for #<ArticlesController:0xb732c0b4>" error when I attempt... http://localhost:3000/articles/new Help would be appreciated. My app/controllers/application.rb reads... ------------------------------------------------------------------------
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 10
1
Paginating Problema :(
I''ve done paginating a lot, and it works great. But for some reason, this time, it paginates fine, but the Next Page link doesn''t work - it adds the ?Page=2 but it doesn''t actually display the next page, it displays the first page still. What process actually happens when you hit next page? Does it reload the action you''re in? What could the potential
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 08
1
Paginating an existing array
I have a rather complex query that constructs the array @posts I''d really like to have these results paginated, but the nature of the query I''m running won''t let me use pagination the normal way. Since I already have a complete array, can''t I just paginate those results some way? -- Posted via http://www.ruby-forum.com/.
2006 Aug 11
0
Paginating HABTM?
Is there an easy way to paginate HABTM? Something like (which doesn''t work): @pages, @directories = paginate :directories, :include=>:categories, :per_page=>ITEMS_PER_PAGE directories and categories have an HABTM association. Joe -- Posted via http://www.ruby-forum.com/.
2005 Dec 09
0
Paginating HABTM
Is there a good way to use the Pagination Helper to paginate HABTM collections? For example: If Foo HABTM Bars, how can I paginate Foo''s Bars? -- john david schult usa : georgia : buford m: 404.510.5163
2006 Nov 08
0
Paginating a fetched resultset problems with next/previous
Im using this paginate function to paginate complex sql queries http://www.bigbold.com/snippets/posts/show/389, all seems to work fine but theres one thing, when i hit the next link it show nothing, i mean it only shows the first page, here is the code im using: #application.rb----------------- def paginate_collection(collection, options = {}) default_options = {:per_page => 10, :page
2006 Jan 02
3
Selecting conditionally from HABTM
Hello, I was wondering whether there is a nice Rubyesque way of selecting from a pair of HABTM models where one of them is inherited from another object. Here is the situation: I have a ''posts'' table from which ''replies'' and ''articles'' are inherited. Articles have_and_belong_to_many categories, but neither posts nor replies do (it just does