class RailsAdmin::Config::Fields::Types::RichEditor

Public Instance Methods

scope_id() click to toggle source
# File lib/rich/rails_admin/config/fields/types/rich_editor.rb, line 24
def scope_id
  bindings[:object].id
end
scope_type() click to toggle source
# File lib/rich/rails_admin/config/fields/types/rich_editor.rb, line 14
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