class Administrate::Field::ScopedHasMany

Public Instance Methods

to_partial_path() click to toggle source
# File lib/administrate/field/scoped_has_many.rb, line 17
def to_partial_path
  "/fields/#{self.class.superclass.field_type}/#{page}"
end
to_s() click to toggle source
# File lib/administrate/field/scoped_has_many.rb, line 13
def to_s
  data
end

Private Instance Methods

candidate_resources() click to toggle source
# File lib/administrate/field/scoped_has_many.rb, line 23
def candidate_resources
  scope = options[:scope] ? options[:scope].call(self) : associated_class.all
  scope = scope.includes(*options.fetch(:includes)) if options.key?(:includes)

  order = options.delete(:order)
  order ? scope.reorder(order) : scope
end