Cache items on AsciicastListPresenter

This commit is contained in:
Marcin Kulik 2014-02-01 01:12:19 +01:00
parent d06801487c
commit 7fb6c0354c

View File

@ -27,6 +27,12 @@ class AsciicastListPresenter
end
def items
@items ||= get_items
end
private
def get_items
PaginatingDecorator.new(
Asciicast.for_category_ordered(category, order, page, per_page)
)