Thank you, I used this params, Ithoughts Ican do it with some options in
the gem
regards
On Friday, August 8, 2014 11:21:24 PM UTC+2, Walter Lee Davis wrote:
You could use the params[:page] attribute to switch this off and on, I
guess. If params[:page] is missing or equal to 1, then do
Could you look at kaminari gem. It is more flexible and allows you change
everything.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi,
I am using will_paginate gem to paginate some results and it works very well
but I want to be able to edit the first page and palce some html fragments
not included in the results on top or on the side
how can I do this to have the fragment only in the first page
regards
--
You received
You could use the params[:page] attribute to switch this off and on, I guess.
If params[:page] is missing or equal to 1, then do this, else do that.
Walter
On Aug 8, 2014, at 6:17 AM, Melb01 wrote:
Hi,
I am using will_paginate gem to paginate some results and it works very well
but I want
Hi,
I get undefined method *`paginate' for #Mongoid::Contextual::TextSearch*if I
try to paginate a full text search.
Using mongoid (4.0.0.alpha1) and will_paginate_mongoid (2.0.1)
@ads = Ad.text_search( params[:q] )
.paginate(:page = params[:page], :per_page = 10 )
It does however work
Hello,
I have a model called book and this book will have many pages. For
displaying the pages i have used will_paginate. It is working fine but i
wanted to change the url. right now url is like
http://localhost:3000/books/book1?page=4;. I have a title for each
pages. So instead of page number
On Oct 4, 2013, at 6:18 AM, Akhil K. wrote:
Hello,
I have a model called book and this book will have many pages. For
displaying the pages i have used will_paginate. It is working fine but i
wanted to change the url. right now url is like
http://localhost:3000/books/book1?page=4;. I have
Hello everyone, I am having an issue with the will_paginate gem, i have
recently added AJAX and JS to refresh the div with paginate without
refreshing the page.
I followed online examples and successfully got it working, however the
previous button and the first page are not shown as links, and
Could you provide rendered HTML for the Previous button? My idea would be
it is disabled somehow and you got to alter that part of HTML too with your
code in index.js.erb; i.e. it is rendered as non-link for the first
(default) rendering of the pagination, and that element has no idea you're
I think its better to add
%= will_paginate @tickets, :previous_label = larr; Previous,
:next_label = Next rarr; %
in the partial file (customerList). I hope it may be useful
On Thu, Mar 28, 2013 at 8:57 PM, Gintautas Šimkus dihita...@gmail.comwrote:
Could you provide rendered HTML for the
Hi Guys,
In my application I created this method:
def self.find_paginated_posts_by_post_type(post_type,page=1,query=)
if query.empty? == false
query = %#{query}%
else
query = %
end
result = includes(:user).
where(['post_type_id = ? AND title LIKE ?',
On Feb 9, 2012, at 5:11 PM, Bruno Meira wrote:
Hi Guys,
In my application I created this method:
def self.find_paginated_posts_by_post_type(post_type,page=1,query=)
if query.empty? == false
query = %#{query}%
else
query = %
end
result = includes(:user).
Hi Walter,
I will take a look in this solution and in this Kamirami
Thx for the answer ;D
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this
First time using Kaminari... But it seems to be a good gem.
Thx for the tip ;D
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send
I'm using will_paginate on my app and it's working fine. The problem
came when I had to put search field.
After the search, the first page comes according to the parameter
passed, but when I go to the second page, it don't brings me the
second page, but a new search with no search parameter
On 31 January 2012 12:16, Pedro pogerm...@gmail.com wrote:
I'm using will_paginate on my app and it's working fine. The problem
came when I had to put search field.
After the search, the first page comes according to the parameter
passed, but when I go to the second page, it don't brings me
Hi all, I am working on a project and I got excited to get pagination
and ajax working. I am using rails 3.1. What I have is a form for
creating a client, and inside that form i have a table that I have
implemented ajax, search, sort, and pagination following a railscasts
using will_paginate.
Hi there!
I need some help, I'm new to rjs + will_paginate and don't know how
to
solve this problem.
The application apparently is working fine, the partial is rendered
by the javascript, the pagination works fine, but sometimes, when I
hit the next page number or next , it reders the code
It's visually annoying to see every URL with escape=false appended to
it. It doesn't even makes sense, disabling the escaping through a GET
parameter? What?
How do I disable it so the pages show up like ?page=1, instead of
?page=1escape=false ? -.-
--
Posted via http://www.ruby-forum.com/.
--
Hi,
This is Mathew vivek A
I am facing some problems using will_paginate for multiple params
Can anyone explain me in detail
My code is :
%= will_paginate @areas,:params = {:field_officer =
params[:field_officer],:branch = params[:branch]}%
--
Posted via http://www.ruby-forum.com/.
--
You
-Original Message-
From: Mathew Vivek
Sent: 28/03/2011 3:55:08 pm
Subject: [Rails] will_paginate with multiple params
Hi,
This is Mathew vivek A
I am facing some problems using will_paginate for multiple params
Can anyone explain me in detail
My code is :
%= will_paginate @areas
I'm using the plugin will_paginate with a table of more than 100,000
records, i also do a join with other table.
I'm wondering if will_pagination in my situation is an appropriate
choice, or whether it is better to implement something ad-hoc?
--
Posted via http://www.ruby-forum.com/.
--
You
I'm using the plugin will_paginate with a table of more than 100,000
records, i also do a join with other table.
I'm wondering if will_pagination in my situation is an appropriate
choice, or whether it is better to implement something ad-hoc?
What are you experiencing that is making you doubt
Quoting Aldo Italo li...@ruby-forum.com:
I'm using the plugin will_paginate with a table of more than 100,000
records, i also do a join with other table.
I'm wondering if will_pagination in my situation is an appropriate
choice, or whether it is better to implement something ad-hoc?
Large
Hello. I'm working very hard to build projects photo_albums Photos
But am Stuck on being able to implement it.
Desired User Flow...
#1 - User clicks their project
#2 - User sees a list of photo albums
#3 - Users clicks a Photo Album
#4 - User see a list of photos in the album
Hello Guys
I hope someone can help me
I've been trying but without success to do a pagination using the
will_paginate gem.
When I'm listing all records the system paginates but when I'm doing a
filter to show some records, just show the first five. Someone knows
whats happening?
My code
Hi
I am using rails 2.3.8 ruby 1.3.7 will_paginate 2.3.14
I have table name books. I am doing this code for pagination,
In book_controller
books = Book.paginate :page = params[:page], :per_page = 10
in index.html.erb
@%= will_paginate @books %@
Also added in
gem install will_paginate
try again
On Tue, Aug 24, 2010 at 11:48 AM, pravin mishra
diatm.pravin.it.07...@gmail.com wrote:
Hi
I am using rails 2.3.8 ruby 1.3.7 will_paginate 2.3.14
I have table name books. I am doing this code for pagination,
In book_controller
books =
I had install will_paginate 2.3.14
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
Dear Madam/ Sir,
This is my first post, and I am stuck it for many months.
I have below error msg:
NoMethodError (undefined method `paginate' for #Class:0x640ccc4):
app/controllers/manage_controller.rb:24:in `list'
Here is my code:
def list
#...@images = Image.paginate :page =
hello
my problem is not solved till now
my configaration is like that
C:\InstantRails-2.0-win_2\
rails_apps\paginationgem list will_paginate
*** LOCAL GEMS ***
will_paginate (2.3.14)
C:\InstantRails-2.0-win_2\rails_apps\paginationgem list ruby
*** LOCAL GEMS ***
rubygems-update
Hello,
I've got a list in a view and each of element of it has a link_to_remote
and everything worked like a charm. Now I added AJAX pagination and the
link_to_remote doesn't work anymore.
This is the partial of the list:
% for character in characters %
%= character.name %
%=
I have a Persons table created with scaffold. I was trying to flick
between records by clicking on Previous and Next links. I was
struggling to understand will_paginate, and finally came up with
following solution, and I'm wondering if it could be done better.
Would it be better to have one query
Rewriting your example a little, I think I would do it like this:
# controller
@person = Person.find(params[:id])
@person_previous = Person.first, :order = 'id DESC', :conditions = [id
?, @person.id]
@person_next = Person.first, :order = 'id ASC', :conditions = [id ?, @
person.id]
# view
%=
Does anyone have experience with will_paginate?
I'm trying to use it with acts_as_ferret.
routes.rb
...
map.search '/search', :controller = 'notes', :action = 'search'
notes.rb
...
acts_as_ferret :fields = [ 'body' ]
notes_controller.rb
...
def search
if params[ :query ]
@query =
Hi,
I am using will_paginate for pagination purpose.
I have a partial with name my_friends, I have a pagination of 25 per
page.
I have added %= will_paginate @user_friend} % in my partial.
It is working fine. I have a functionality to delete the friend.
So I have usd link_to_remote call to delete
Hello there,
On my site I have a basic search form that uses find_by_ferret which
will return users within the site and render the data that matches the
search criteria
If multiple rows are returned, the rows are rendered, and then
paginated, if more that X are returned. Sounds simple, (and
are you sure you have installed the GEM ?
Thanks Regards,
Dhruva Sagar.
On Thu, Nov 26, 2009 at 8:54 AM, femto femto...@gmail.com wrote:
Hello all,will_paginate don't work on jruby platform,
the Model.paginate find works ok, accepts all kinds of params,
this is config.gem
config.gem
hi;
i use will_paginate the first page come true but all other page get the
same data of first page i checked in controller page parameter works
true but paginate get only first page's data and shows these data in all
pages
forexample first page seen A,B second page also seen A,B but second page
I've just reinstalled linux (9.10) and am trying to match my gem
environment to our server's. I'm having a problem with will_paginate.
On the server, under gem list, i have mislav-will_paginate (2.3.6).
So, i'm trying to install that locally. Following the instructions on
the will_paginate
Hi,everybody
I write a code like follow,the question was paginate has been drop
until the rails 2.0,now we use
will_paginate to replace it.But I don't know how to change my code
to let it suitable.
Hi,everybody
I write a code like follow,the question was paginate has been drop
until the rails 2.0,now we use
will_paginate to replace it.But I don't know how to change my code
to let it suitable.
I put everything in a pastie to make it a bit more readable:
http://pastie.org/593379
This is the gist:
Will_paginate doesn't play quite nice. The first result set is fine,
and when I click on one of the paginated links, it returns the following
error:
Couldn't find DictatedExam with
I tried to delete from a datatable that I represent with will_paginate
and ajax. In the view there are something like that:
tbody
% @items.each do |i| %
tr class=%= cycle(even,odd) %
td%= i.name %/td
td%= i.quantity %/td
td%= i.price %/td
td%= link_to 'Destroy',
i have tryed to use:
@my_object = Myclass.paginate(:select = id, title, position, :page =
params[:page]||false, :per_page = @value_per_page )
but the query exctract all the fields.
what is the right sintax to obtain only specified fileds?
--
Posted via http://www.ruby-forum.com/.
Hi, I don't speak English very well, and I have a problem, with the gem
mislav-will-paginate I install perfect, the las version 2.3.11 and I did
the example
http://dev.nozav.org/rails_ajax_table.html and I copy all!!
My problem is this:
NoMethodError in ItemController#list
undefined method
hi i use will_paginate for pagination in my blog. i set itto limit 3
posts per page but also limit my RSS feeds :/ any suggestion ?
this is my code:
controllers/posts.controller.rb
def index
@posts = Post.all
@posts = Post.paginate :page = params[:page], :order = 'created_at
DESC',
Hi you all, I have an app where I do two finds in different tables:
@results_m = Man.find(:all)
@results_w = Woman.find(:all)
I can paginate each of one with paginate:
@results_m = Man.paginate([params page stuff here...])
@results_w = Woman.paginate([params page stuff here...])
However, I
hey folks
I have a page that used to have a url in this sort of form
/resources/browse/property_ids[]=72property_ids[]=722
I changed the format to be nicer - using the name of the properties and
seperating with a +
/resources/browse/72-Violin+722-Pieces
The '+' acts as a join between
Hi,
I am using the will_paginate plugin for my application.
It is showing Prevoius 1,2,3...22,23,24 Next
but I like to have My view Page as
First Previous Next Last instad of showing the numbers,
How will I customise the plugin?
--
Posted via http://www.ruby-forum.com/.
Hi all,
I'm having a bit of a problem with displaying a blog list using the
will_paginate helper. My code is:
entries_controller:
def index
@entries = Entry.find(:all)
@blog_entries = @entries.paginate( :page = params[:page], :per_page =
4,
:include =
I am using will_paginate to paginate my site. I also have a
link_to_remote in my view that will toggle view modes (from list to
icon view). My will_paginate code works fine until I click on my
link_to_remote. At that point my will_paginate code (which is in the
partial that is updated in the
i have noted a problem in will_paginate :
In a pagination, when go to pages geather than 1 value thath' ok, but if
you back to page 1 in the URL appear the parameter page=1
this is bad for seo optimization, because engine view same page with
diffent URL.
how can remove the param only for the
Hi, first at all sorry if my english is not the best.
I'm trying to include the plugin vote_fu to my aplication following
these steps http://github.com/peteonrails/vote_fu/tree/master.
I install the plugin and i run the migration. It rules perfectly:
== 20090324090130 VoteFuMigration:
I have this problem: user can select some params from a form:
% form_tag({:action = view}, :method = get, :target =
_blank) do %
% end %
In method view of controller:
.
@items = Item.paginate :all, :include = , :conditions
= ., :page = page, :order = .., :per_page = 10
I searched in Internet (http://wiki.github.com/mislav/will_paginate/
simple-search and http://railscasts.com/episodes/51), but I can't
solve my problem about pagination. The first page is ok, but when I
click the “Next page” or any other page link, I lose the FIELD1,
FIELD2, FIELD3 parameter(s).
hi all,
I am using will_paginate plug_in i am getting URL as
http://localhost:3000/admin/edit#/admin/edit?page=3
but i want it should be
http://localhost:3000/admin/edit?page=3
how can I do it.
--
Posted via http://www.ruby-forum.com/.
Hi
I have a problem while implementing pagination.
Am using will_paginate for it.
I have a index page where am dispalying a list of users with pagination.
Also there is a search feature, when user searches the users list ll be
changed according to the search result.Now comes the problem.
This
Hi there,
I am paginating my products using will_paginate(12 items per page),
and i added this line to my routes file, for make wil_paginate work
with friendly url's:
map.paginated_product 'products/page/:page', :controller =
'products', :action = 'index', :page = 1
1- First question: when i
Hi All,
I have implemented application for searching the streams from
database.And tryng to implement the pagination on the result page.
In my index page i have drop down boxes created using form tags .I can
select a parameter from each drop down box and i can search for
streams based on
Hi. I need help :)
The thing is that I must write a controller to do a generic search
throughout multiple resources available in an application.
So the idea was to do this:
1º -- do all the searches
@a = search1
@b = search2
@c = search3
...
2º merge the results
@result = @a +
Can I limit results in will_paginate plugin?
I want to paginate only 100 results 10 per page.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To
Hello,
I am using will_paginate and want to use eager loading. but when i use
the include and order option i get an error. I am using mssqlserver2000
as database
@people =
Person.paginate(:include=[:relations],:conditions=['People.id NOT IN
(Select person_id from
In the will_paginate plugin/gem lies a file /test/fixtures/user.rb. It
seems that that user.rb is somehow overriding app/model/user.rb. How
is it doing this? What can I do to stop it from destroying my app?
--~--~-~--~~~---~--~~
You received this message because
Hi,
I am creating a little blogging engine, so I want the most recent posts
to display first, so I make a search with :order = 'created_at DESC'
For some reason, will_paginate works the opposite way I expect it to be.
I mean the previous / next links are opposite to what I want. What could
I be
I am trying to use will_paginate with group_by but i keep getting
undefined method `total_pages' for.
--Controller--
@records = Record.paginate( :conditions = ['this_id = ? and that_id =
?',session[:this_id],session[:that_id]], :page = params[:page],:order
= 'created_at DESC', :per_page =
Hi guys:
i have a question about Will_paginate .
i have mutilple same type collections.
for example .
items_1 = Post.find(:all , :conditions ={...}) # different condtions to
get the items_1
items_2 = Post.find(:all, :conditions ={...}) # diffenrt conditions to
get the item_2
items = items_1
I have a paginate call like this:
@person.chats.paginate :per_page = 50, :page = params[:page], :order =
created_at ASC
which you'd think would order by created_at in ascending order...
Wrong!
If I have has_many :chats, :order = created_at DESC on my Person model,
it will attempt to do both
Hi,
I am trying to use the will_paginate helper.
I installed the gem and put require 'will_paginate' in the
environment.rb file.
In my controller
@tasks = Task.paginate :page = params[:page], :order = 'date_begin
DESC'
In my view
%= will_paginate @tasks %
The view doesn't show anything.
69 matches
Mail list logo