refactoring

This commit is contained in:
albert
2011-06-12 16:41:23 -04:00
parent 033f0fc266
commit d6e4283cc7
41 changed files with 197 additions and 429 deletions

View File

@@ -18,6 +18,22 @@ module PostSets
end
end
def first_id
if posts.any?
posts.first.id
else
nil
end
end
def last_id
if posts.any?
posts.last.id
else
nil
end
end
def pagination_options
{:before_id => before_id, :after_id => after_id}
end