Module: MultipleFileEditorHelper
- Defined in:
- app/helpers/multiple_file_editor_helper.rb
Instance Method Summary collapse
Instance Method Details
#highlight_modes ⇒ Object
2 3 4 |
# File 'app/helpers/multiple_file_editor_helper.rb', line 2 def highlight_modes Language.all.map { |it| { extension: it.extension, highlight_mode: it.highlight_mode } } end |
#multifile_hidden_inputs ⇒ Object
10 11 12 13 14 |
# File 'app/helpers/multiple_file_editor_helper.rb', line 10 def multifile_hidden_inputs hidden_field_tag('highlight-modes', highlight_modes.to_json) + hidden_field_tag('multifile-locales', multifile_locales.to_json) + hidden_field_tag('multifile-default-content', @files.to_json) end |
#multifile_locales ⇒ Object
6 7 8 |
# File 'app/helpers/multiple_file_editor_helper.rb', line 6 def multifile_locales :insert_file_name.try { |it| { it => t(it) } } end |