• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

Today, maiha, the author of the one of the most authorized books regarding rails in Japan, had sent me a patch including various improvements for the PaginationScope. I want to say thank you for the great contribution.

And then I merged it into the master and pushed to the GitHub.

http://github.com/genki/pagination_scope/tree/master

Here is the list of improvements from Maiha.

<モデル>

  • AR.paginate の第三引数に options を渡せるように変更
  • AR.paginate の options は第一引数でも可能にした AR.paginate(params[:page], 10, options) 以外にも以下のように書ける
       1     options = {
       2       :page => params[:page],
       3       :per_page => 10,
       4       :order => "id",
       5     }
       6     AR.paginate(options)
    

<ヘルパ>

  • Helper#paginate のオプション名を変更 (newer->prev, older->next) 昇順、降順によって newer/older が逆の意味になってわかり辛かったので
  • Helper#paginate の各要素にクラス名を付与 will_paginate のスタイルシートがそのまま使えるように合わせた
  • Helper#paginate のリンクに rel 属性を追加 AutoPagerize 対応
  • Helper#paginate のオプションに truncate を追加 省略時の '...' を設定可能にした

Thanks again!

posted by Png takiuchi on Fri 26 Sep 2008 at 18:48
Contents
Shipped PaginationScope-0.0.6, Thanks to Maiha.
Comments
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
falsefalse: @tiancongxin try using this one https://github.... '12-2
tiancongxin: TerminalCopyOnSelect not work on OS X 'Lion' , ... '11-7
staiano: Roderick you rock for recompiling it. Thanks. '11-3
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ