Class: Administrate::Field::Associative

Inherits:
Base
  • Object
show all
Defined in:
lib/administrate/field/associative.rb

Direct Known Subclasses

BelongsTo, HasMany, HasOne

Instance Attribute Summary

Attributes inherited from Base

#attribute, #data, #options, #page, #resource

Instance Method Summary collapse

Methods inherited from Base

associative?, field_type, html_class, #html_class, #initialize, #name, permitted_attribute, searchable?, #to_partial_path, with_options

Constructor Details

This class inherits a constructor from Administrate::Field::Base

Instance Method Details

#associated_classObject



10
11
12
# File 'lib/administrate/field/associative.rb', line 10

def associated_class
  associated_class_name.constantize
end

#display_associated_resourceObject



6
7
8
# File 'lib/administrate/field/associative.rb', line 6

def display_associated_resource
  associated_dashboard.display_resource(data)
end