24 lines
420 B
Ruby
24 lines
420 B
Ruby
|
module Locomotive
|
||
|
module Liquid
|
||
|
module Tags
|
||
|
module Editable
|
||
|
class File < Base
|
||
|
|
||
|
protected
|
||
|
|
||
|
def render_element(element)
|
||
|
element.source? ? element.source.url : element.default_content
|
||
|
end
|
||
|
|
||
|
def document_type
|
||
|
EditableFile
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
::Liquid::Template.register_tag('editable_file', File)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|