Sha256: e18e9d318b2cc4d44c16b167e77a53127be7f7d4ad73df4565b4fb42d82a1fe6

Contents?: true

Size: 437 Bytes

Versions: 108

Compression:

Stored size: 437 Bytes

Contents

module EditorHelper
  def editor_defaults(language, options, styles = '')
    {class: styles,
     data: {placeholder: I18n.t(:editor_placeholder),
            'editor-language' => language},
     rows: 15}.deep_merge(options)
  end

  def read_only_editor(content, language, options = {})
    editor_options = editor_defaults(language, options, 'read-only-editor')
    text_area_tag :solution_content, content, editor_options
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
mumuki-laboratory-9.13.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.13.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.12.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.12.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.11.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.10.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.9.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.8.2 app/helpers/editor_helper.rb
mumuki-laboratory-9.8.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.8.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.7.2 app/helpers/editor_helper.rb
mumuki-laboratory-9.7.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.7.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.6.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.5.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.5.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.4.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.4.0 app/helpers/editor_helper.rb
mumuki-laboratory-9.3.1 app/helpers/editor_helper.rb
mumuki-laboratory-9.3.0 app/helpers/editor_helper.rb