query: tag:pagination
dm-is-paginated-0.0.1は、specが走らない状態だったので、 Railsの [pagination_scope](https://github.com/genki/pagination_scope/tree)風味のDataMapper用Paginationライブラリとして、 [dm-pagination](http://github.com/genki/dm-pagination/tree/master) を作りました。 ruby>> class Posts def index @posts = Post.paginate(:page => params[:page]) end <<-- 上記のようにコントローラでpaginationオブジェクトを作成し、 Viewから以下のように参照します。 html>>
    <% @posts.each do |post| %>
  • <%= h(post.body) %>
  • <% end %>
<%= paginate @posts %> <<--
posted by genki genki on Thu 15 Jan 2009 at 01:41 with 0 comments

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)
    以外にも以下のように書ける
    ruby>>
    options = {
    :page => params[:page],
    :per_page => 10,
    :order => "id",
    }
    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 takiuchi takiuchi on Fri 26 Sep 2008 at 18:46 with 0 comments
Contents rssrss
Leading Smart TV App Development Companies | USA | 4 Way Technologies
Apple TV Developer | TVOS Development | USA | 4 Way Technologies
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Value Transformer
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Tags
pagination
Comments rssrss
http://ldm.sakura.ne.jp/balu+bbbs/album/album.cgi?mode=detail&no=210 http://ldm.sakura.ne.jp/balu+bbbs/album/album.cgi?mode=detail&no=210: Aw, this was an incredibly good post. Taking the t... 04/25 18:19
https://www.bigbeargum.com/2019/02/15/ambrose-redmoon/ https://www.bigbeargum.com/2019/02/15/ambrose-redmoon/: Hello would you mind letting me know which hosting... 04/25 17:39
http://zeroken.jp/1978td/album/album.cgi?mode=detail&no=20 http://zeroken.jp/1978td/album/album.cgi?mode=detail&no=20: Asking questions are genuinely fastidious thing if... 04/25 17:26
https://natucci-estetica.com/?attachment_id=1376 https://natucci-estetica.com/?attachment_id=1376: Hello there, You have done a fantastic job. I wi... 04/25 17:05
https://www.waimaoz.com/23019.html?unapproved=5151&moderation-hash=a14b2a811444fc3059edb7c1441d076e https://www.waimaoz.com/23019.html?unapproved=5151&moderation-hash=a14b2a811444fc3059edb7c1441d076e: Good day! Do you use Twitter? I'd like to follow y... 04/25 16:50
https://bysystem.ru/process-proizvodstva-kartonnyh-korobok-i/ https://bysystem.ru/process-proizvodstva-kartonnyh-korobok-i/: Требовалось производство картонных коробок в сжа... 04/25 15:33
https://marialionsa.ru/proizvodstvo-kartonnyh-korobok-i-upakovki/ https://marialionsa.ru/proizvodstvo-kartonnyh-korobok-i-upakovki/: Документооборот четкий, все закрывающие акты предо... 04/25 15:05
https://example.com/oqaphq https://example.com/oqaphq: This post is genuinely a pleasant one it assists n... 04/25 12:43