Sha256: c503d61ba22222ebe6172c23459e2c1d170dfa38ecf6cd5019cf16ca5d4dca2a
Contents?: true
Size: 683 Bytes
Versions: 25
Compression:
Stored size: 683 Bytes
Contents
#require 'rails_admin/config/fields/base' module RailsAdmin::Config::Fields::Types class Ckeditor < RailsAdmin::Config::Fields::Types::Text RailsAdmin::Config::Fields::Types::register(:ckeditor, self) register_instance_option(:config) do {} end register_instance_option(:partial) do :form_ckeditor end def scope_type # Use association name if existent if bindings[:form].object_name.scan(/.*\[(.*)_attributes\]/).nil? bindings[:form].object_name else bindings[:form].object_name.scan(/.*\[(.*)_attributes\]/).to_s end end def scope_id bindings[:object].id end end end
Version data entries
25 entries across 25 versions & 1 rubygems