Every repository with this icon (
Every repository with this icon (
| Description: | Adaptive pagination plugin for web frameworks and other applications edit |
-
5 comments Created about 1 month ago by masterkainbugxwill_paginate helpers and edge railstodoxhi,
Rails changed default html rendering to "safe mode" by default, escaping html chars, etc.Result:
Displaying Records <b>1 - 30</b> of <b>414</b> in tot...Comments
-
0 comments Created 8 days ago by bultacorickDefault :previous_label and :next_label break under Rails3todoxRails3 includes some new html and json safety that prevents '&', '<', and '>' characters passing unmodified as link_to labels. See ActionView::Erb::Util HTML_ESCAPE{} for details. End result is that link_to "« Previous" comes out on the screen as "« Previous".
Comments
-
3 comments Created 4 months ago by fozzerequire 'facets' extends Fixnum with a 'length' method causing wp_count to return an incorrect countbugxIn finder.rb, in the wp_count method, there is a condition at the bottom of the method that checks
for whether the count responds to a length method. The popular facets gem breaks this. Perhaps, it might would be better to use is_a? instead of respond_to?check finder.rb, line 238
Comments
Hi folks. Lemme know how this patch works for you:
http://github.com/jingoro/will_paginate/commit/627054b3f648417bb045702d2eb709ee0b34c492
-
1 comment Created 3 months ago by johngrimesRemoving next link causes last page to repeatbugxThere seems to be a problem when you remove the next link by setting the next_link parameter to nil on the will_paginate method.
It seems to result in the link for the last page being repeated.
For example:
« Previous 1 2 2Comments
-
Reported by Ron Valente with mislav-will_paginate v2.3.11
466992 rows in set (0.97 sec)
>> h = Host.paginate :per_page => 15, :page => 1SystemStackError: stack level too deep
Ruby Versions - Same Error On Both
1. ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
2. ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9]Comments
Hey Ron,
First of all, check if you have some old version of will_paginate installed:
gem search will_paginateIf there is an old version, you can either uninstall it or make sure that your application loads the correct version by following the instructions in the wiki.
Next, tell me what version of Rails (or ActiveRecord, for that matter) are you using.
Third: does this happen with other tables that aren't so huge?
-
Finder.wp_count remove need group by option so returns invalid value
1 comment Created 2 months ago by ZenCocoonHi,
Here is the requests generated and showing the issue :
Author Load (1.3ms) SELECT
users., COUNT(1) AS count FROMusersINNER JOINpostsONposts.author_id =users.id WHERE ( (users.type= 'Author' ) ) GROUP BYposts.author_id LIMIT 2, 2 SQL (0.2ms) SELECT count() AS count_all FROMusersINNER JOINpostsONposts.author_id =users.id WHERE ( (users.type= 'Author' ) )In this case the GROUP BY as been removed but should have been kept to return the right number of results.
Comments
-
Finder.wp_count use invalid select option and breaks counting request
1 comment Created 2 months ago by ZenCocoonHi,
Here we go with the second issue regarding the counting request :
SELECT count(
users.*,addresses.full_address) AS count_users_all_addresses_full_address FROM ...This case actually breaks.
Looks like the select option could have been replaced to produce the following request and work as expected :SELECT COUNT(1) AS count_all FROM ...
Right now I work around this issue using the :count option of paginate but doesn't feel natural.
Let me know if you need further details.P.S. : a BIG thanks for this wonderful gem.
Comments
-
Hello mislav,
Is fully I18n support in todo list of will_paginate?
I'm using will_paginate with in some sites which needs to be internationalized.
Thanks
Comments
Yes, I18n is definitely planned. Thanks for requesting. Until the next major release you can copy-paste the
page_entries_infomethod in your own helpers and re-define it with internationalized strings. As forwill_paginatehelper, you can translate previous/next links by the use of option parameters.Thanks for response mislav. I will do it, thanks again.
jamesarosen
Sun Sep 27 12:08:12 -0700 2009
| link
-
:page parameter problem in the method paginate
0 comments Created 13 days ago by bcaccinoloHi,
The paginate method defaults to 1 the parameter :page if this one is false or nil. This parameter can also be an empty string. It could be good to defaults :page to 1 also in this case. We encountered this problem when our site is crawled by google bots.Here is my patch to this bug
http://gist.github.com/218537Comments
-
first of all thanks for sharing this great stuff. I am using this, amongst others, to skip through a stock of input forms of the same type. That means I am showing only 1 item per page and the user is able to jump or skip through the whole stock. To improve the visualisation I had to change your code of "page_entries_info" like that:
if collection.length == 1 %{Displaying #{entry_name} <b>%d</b> of <b>%d</b> in total} % [ collection.offset + 1, collection.total_entries ] else %{Displaying #{entry_name.pluralize} <b>%d - %d</b> of <b>%d</b> in total} % [ collection.offset + 1, collection.offset + collection.length, collection.total_entries ] endMaybe you like to change this as well for others.
Comments
-
0 comments Created 3 days ago by adamjmurrayentry name underscores in page_entries_infobugxThe default entry_name logic works better if you change the sub() call to gsub(). Then it handles classes with multiple underscores gracefully.
entry_name = options[:entry_name] || (collection.empty?? 'entry' : collection.first.class.name.underscore.gsub('_', ' '))Comments












using
<%=rawseems to fix the issue, you may want to add that to the docsproblem still exists for the default laquo; and raquo; when linked.
Thanks for reporting.
Can't I somehow mark these strings as "untainted", so I don't have to explicitly use
raw?I'm not sure since I haven't dug the new rails code extensively, but I see this in
http://github.com/rails/rails/commit/9415935902f120a9bac0bfce7129725a0db38ed3#L3R18
my best guess is that you can declare that the output is
.html_safe!hi mislav,
please also check this commit: http://github.com/rails/rails/commit/cc1ad46eadfad2c617d897927eb4bc0c36e1d033