| 2008-06-10 03:08:19 | Ответить |
|---|---|
|
Ruslan Voloshin Адрес: odessa Сообщений: 1231 Регистр: 2007-03-13 его блог 40 сообщ. |
RE: установка will_paginate |
|
Еещ один вариант упрошенных для разбития по страницам
------------
app/controllers/posts_controller.rb Рендерим страницу со всеми постами # class: CSS class name for the generated DIV (default "pagination") # prev_label: default '« Previous', # next_label: default 'Next »', # inner_window: how many links are shown around the current page, defaults to 4 # outer_window: how many links are around the first and the last page, defaults to 1 # separator: string separator for page HTML elements, default " " (single space) # param_name: parameter name for page number in URLs, defaults to "page" # # All extra options are passed to the generated container DIV, so eventually # they become its HTML attributes. # def will_paginate(entries = @entries, options = {}) Сейчас рендерим ссылки исопльзуя pagination! will_paginate @posts Кусок стиля для разукрашивания ссылок на страницы Занимаюсь вебом и продвижением сайтов.
|
|
| Post.paginate, will_paginate |