Sha256: fe108d273834d6450bd6b92377f62736550da1f28b6cc834026ede79a66bbdca
Contents?: true
Size: 1.32 KB
Versions: 6
Compression:
Stored size: 1.32 KB
Contents
module RailsAdmin module Config module Fields module Types class EnjoyHtml < RailsAdmin::Config::Fields::Types::CKEditor # Register field type for the type loader RailsAdmin::Config::Fields::Types::register(self) include RailsAdmin::Engine.routes.url_helpers register_instance_option :html_method do "#{name}_html" end register_instance_option :clear_method do "#{name}_clear" end register_instance_option :pretty_value do bindings[:object].send(html_method) end register_instance_option :form_value do { html: bindings[:object].send(html_method), clear: bindings[:object].send(clear_method) } end register_instance_option :formatted_value do pretty_value end register_instance_option :export_value do pretty_value end register_instance_option :boolean_view_helper do :check_box end register_instance_option :allowed_methods do [html_method, clear_method] end register_instance_option :partial do :enjoy_html end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems