2011-11-21 01:27:05 +00:00
|
|
|
module Locomotive
|
|
|
|
class EditableFilePresenter < EditableElementPresenter
|
|
|
|
|
2011-11-21 11:12:06 +00:00
|
|
|
delegate :content, :to => :source
|
2011-11-21 01:27:05 +00:00
|
|
|
|
|
|
|
def filename
|
2011-11-21 11:12:06 +00:00
|
|
|
File.basename(self.content)
|
2011-11-21 01:27:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def included_methods
|
2011-11-21 11:12:06 +00:00
|
|
|
super + %w(filename content url)
|
2011-11-21 01:27:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|