2011-12-05 12:29:58 +00:00
|
|
|
module Locomotive
|
|
|
|
class SnippetPresenter < BasePresenter
|
|
|
|
|
|
|
|
delegate :name, :slug, :template, :to => :source
|
|
|
|
|
2011-12-06 11:39:32 +00:00
|
|
|
def updated_at
|
|
|
|
I18n.l(self.source.updated_at, :format => :short)
|
|
|
|
end
|
|
|
|
|
2011-12-05 12:29:58 +00:00
|
|
|
def included_methods
|
2011-12-06 11:39:32 +00:00
|
|
|
super + %w(name slug template updated_at)
|
2011-12-05 12:29:58 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|