lib/alula/contents/post.rb in alula-0.4.13 vs lib/alula/contents/post.rb in alula-0.4.14
- old
+ new
@@ -3,27 +3,9 @@
module Alula
class Content
class Post < Item
has_payload
- def previous(locale = nil)
- pos = self.navigation(locale).index(self)
- if pos and pos < (self.navigation(locale).count - 1)
- self.navigation(locale)[pos + 1]
- else
- nil
- end
- end
-
- def next(locale = nil)
- pos = self.navigation(locale).index(self)
- if pos and pos > 0
- self.navigation(locale)[pos - 1]
- else
- nil
- end
- end
-
def navigation(locale = nil)
locale ||= self.current_locale || self.site.config.locale
@navigation[locale] ||= self.site.content.posts.select { |item| item.languages.include?(locale) }
end
end
\ No newline at end of file