Module: Pageflow::Editor::FilesHelper Private
- Includes:
- AudioFilesHelper, FilesHelper, RenderJsonHelper, VideoFilesHelper
- Defined in:
- app/helpers/pageflow/editor/files_helper.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary
Constants included from RenderJsonHelper
RenderJsonHelper::ESCAPED_CHARS, RenderJsonHelper::ESCAPED_CHARS_REGEX
Instance Method Summary collapse
Methods included from RenderJsonHelper
#render_html_partial, #render_json, #render_json_partial, #render_json_seed, #sanitize_json
Methods included from VideoFilesHelper
#lookup_video_tag, #mobile_poster_image_div, #poster_image_tag, #video_file_non_js_link, #video_file_script_tag, #video_file_sources, #video_file_video_tag
Methods included from RevisionFileHelper
Methods included from AudioFilesHelper
#audio_file_audio_tag, #audio_file_non_js_link, #audio_file_script_tag, #audio_file_sources
Methods included from FilesHelper
#file_dimensions, #file_duration, #file_format, #files_json_seed
Instance Method Details
#editor_files_json_seed(entry) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/pageflow/editor/files_helper.rb', line 10 def editor_files_json_seed(entry) inner = Pageflow.config.file_types.map { |file_type| json = render_json_partial(partial: 'pageflow/editor/files/file', collection: entry.find_files(file_type.model), locals: {file_type: file_type}, as: :file) %("#{file_type.collection_name}": #{json}) }.join(',') "{#{inner}}".html_safe end |