engine/app/presenters/locomotive/editable_file_presenter.rb

15 lines
248 B
Ruby
Raw Normal View History

module Locomotive
class EditableFilePresenter < EditableElementPresenter
delegate :url, :to => :source
def filename
File.basename(self.source.url)
end
def included_methods
super + %w(filename url)
end
end
end