Sha256: 2c649f7aee5fb135c953e3ffd12f9a783dbb98b78ee8abf1f4d2f27ec8e50ee6
Contents?: true
Size: 628 Bytes
Versions: 30
Compression:
Stored size: 628 Bytes
Contents
module Lalala::Markdown::InputHelper extend ActiveSupport::Concern def input(method, options = {}) if @object.respond_to?("#{method}_html") options = options.dup.clone input_html = options[:input_html] || {} input_html[:class] = [input_html[:class], 'markdown'].flatten.compact.join(" ") editor_options = options[:editor_options] || {} editor_options.each do |k, v| v = if v === true then "1" elsif v === false then "0" end input_html["editor-#{k.to_s.gsub("_", "-")}"] = v end options[:input_html] = input_html end super(method, options) end end
Version data entries
30 entries across 30 versions & 1 rubygems