class Admin::PartialBuilder::Options
Public Class Methods
new(template)
click to toggle source
# File lib/ecrire/app/forms/admin/partial_builder.rb, line 79 def initialize(template) @template = template end
Public Instance Methods
editor_options()
click to toggle source
# File lib/ecrire/app/forms/admin/partial_builder.rb, line 87 def editor_options [ content_tag(:a, t('fields.text'), binding: ".editor.content", class: %w(content active)), content_tag(:a, t('fields.CSS'), binding: ".editor.stylesheet", class: %w(content)), content_tag(:a, t('fields.JS'), binding: ".editor.javascript", class: %w(content)) ].join.html_safe end
method_missing(method, *args, &block)
click to toggle source
# File lib/ecrire/app/forms/admin/partial_builder.rb, line 99 def method_missing(method, *args, &block) @template.send(method, *args, &block) end
render()
click to toggle source
# File lib/ecrire/app/forms/admin/partial_builder.rb, line 83 def render content_tag(:div, editor_options, class: %w(editor options)) end
t(*args)
click to toggle source
# File lib/ecrire/app/forms/admin/partial_builder.rb, line 95 def t(*args) I18n.t args[0], scope: %w(admin partials form options) end