Use #per_page instead of #items_per_page.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11425 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c17ec1643c
commit
d8e4a8fb32
|
@ -46,7 +46,7 @@ class BoardsController < ApplicationController
|
||||||
@topics = @board.topics.
|
@topics = @board.topics.
|
||||||
reorder("#{Message.table_name}.sticky DESC").
|
reorder("#{Message.table_name}.sticky DESC").
|
||||||
includes(:last_reply).
|
includes(:last_reply).
|
||||||
limit(@topic_pages.items_per_page).
|
limit(@topic_pages.per_page).
|
||||||
offset(@topic_pages.offset).
|
offset(@topic_pages.offset).
|
||||||
order(sort_clause).
|
order(sort_clause).
|
||||||
preload(:author, {:last_reply => :author}).
|
preload(:author, {:last_reply => :author}).
|
||||||
|
|
|
@ -44,7 +44,7 @@ class MessagesController < ApplicationController
|
||||||
@replies = @topic.children.
|
@replies = @topic.children.
|
||||||
includes(:author, :attachments, {:board => :project}).
|
includes(:author, :attachments, {:board => :project}).
|
||||||
reorder("#{Message.table_name}.created_on ASC").
|
reorder("#{Message.table_name}.created_on ASC").
|
||||||
limit(@reply_pages.items_per_page).
|
limit(@reply_pages.per_page).
|
||||||
offset(@reply_pages.offset).
|
offset(@reply_pages.offset).
|
||||||
all
|
all
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ class RepositoriesController < ApplicationController
|
||||||
per_page_option,
|
per_page_option,
|
||||||
params['page']
|
params['page']
|
||||||
@changesets = @repository.changesets.
|
@changesets = @repository.changesets.
|
||||||
limit(@changeset_pages.items_per_page).
|
limit(@changeset_pages.per_page).
|
||||||
offset(@changeset_pages.offset).
|
offset(@changeset_pages.offset).
|
||||||
includes(:user, :repository, :parents).
|
includes(:user, :repository, :parents).
|
||||||
all
|
all
|
||||||
|
|
|
@ -55,7 +55,7 @@ class TimelogController < ApplicationController
|
||||||
@entries = scope.all(
|
@entries = scope.all(
|
||||||
:include => [:project, :activity, :user, {:issue => :tracker}],
|
:include => [:project, :activity, :user, {:issue => :tracker}],
|
||||||
:order => sort_clause,
|
:order => sort_clause,
|
||||||
:limit => @entry_pages.items_per_page,
|
:limit => @entry_pages.per_page,
|
||||||
:offset => @entry_pages.offset
|
:offset => @entry_pages.offset
|
||||||
)
|
)
|
||||||
@total_hours = scope.sum(:hours).to_f
|
@total_hours = scope.sum(:hours).to_f
|
||||||
|
|
|
@ -217,7 +217,7 @@ class WikiController < ApplicationController
|
||||||
@versions = @page.content.versions.
|
@versions = @page.content.versions.
|
||||||
select("id, author_id, comments, updated_on, version").
|
select("id, author_id, comments, updated_on, version").
|
||||||
reorder('version DESC').
|
reorder('version DESC').
|
||||||
limit(@version_pages.items_per_page + 1).
|
limit(@version_pages.per_page + 1).
|
||||||
offset(@version_pages.offset).
|
offset(@version_pages.offset).
|
||||||
all
|
all
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue