Class: RailsAdmin::Config::Fields::Types::HasManyAssociation

Inherits:
Association show all
Defined in:
lib/rails_admin/config/fields/types/has_many_association.rb

Direct Known Subclasses

HasAndBelongsToManyAssociation

Instance Attribute Summary

Attributes inherited from Base

#defined, #name, #order, #properties, #section

Attributes inherited from Base

#abstract_model, #bindings, #parent, #root

Instance Method Summary collapse

Methods inherited from Association

#associated_label_method, #associated_model_config, #association, #child_key, inherited, #inverse_of, #polymorphic?, #value

Methods inherited from Base

#_html_attributes, #association?, #editable, inherited, #initialize, #inverse_of, #nested_form, #optional, #optional=, #optional?, #render, #type, #type_css_class, #value, #virtual?

Methods included from Hideable

#hidden?, #hide, included, #show

Methods inherited from Base

#has_option?, #initialize, register_class_option, #register_deprecated_instance_option, register_deprecated_instance_option, #register_instance_option, register_instance_option, #with

Constructor Details

This class inherits a constructor from RailsAdmin::Config::Fields::Base

Instance Method Details

#errorsObject

Reader for validation errors of the bound object



30
31
32
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 30

def errors
  bindings[:object].errors[name]
end

#method_nameObject



25
26
27
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 25

def method_name
  nested_form ? "#{super}_attributes" : "#{super.to_s.singularize}_ids" # name_ids
end