class Madmin::Fields::Polymorphic

Public Instance Methods

options_for_select(record) click to toggle source
# File lib/madmin/fields/polymorphic.rb, line 4
def options_for_select(record)
  if (collection = options[:collection])
    collection.call
  else
    []
  end
end
to_param() click to toggle source
# File lib/madmin/fields/polymorphic.rb, line 12
def to_param
  {attribute_name => %i[type value]}
end