Class: Administrate::Field::Type
- Inherits:
-
Base
- Object
- Base
- Administrate::Field::Type
- Defined in:
- lib/administrate/field/type.rb
Defined Under Namespace
Classes: Engine
Instance Method Summary collapse
Instance Method Details
#choices ⇒ Object
14 15 16 17 18 |
# File 'lib/administrate/field/type.rb', line 14 def choices c = [] c << class_name if [:include_parent] c + class_name.constantize.subclasses.map(&:to_s) end |
#class_name ⇒ Object
20 21 22 |
# File 'lib/administrate/field/type.rb', line 20 def class_name [:class_name] || raise(ArgumentError, "Field '#{attribute}' requires a class_name") end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/administrate/field/type.rb', line 10 def to_s data end |