mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 16:38:18 +00:00
31 lines
No EOL
430 B
Ruby
31 lines
No EOL
430 B
Ruby
require "administrate/field/base"
|
|
|
|
class Administrate::Field::Array < Administrate::Field::Base
|
|
def to_s
|
|
data
|
|
end
|
|
|
|
def self.permitted_attribute(attr, _options = nil)
|
|
{ attr => [] }
|
|
end
|
|
|
|
def self.searchable?
|
|
true
|
|
end
|
|
|
|
def searchable?
|
|
self.class.searchable?
|
|
end
|
|
|
|
def collection
|
|
data || []
|
|
end
|
|
|
|
def include_blank
|
|
options.fetch(:include_blank, true)
|
|
end
|
|
|
|
def value
|
|
data
|
|
end
|
|
end |