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

Inherits:
Association
  • Object
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

#abstract_model, #defined, #name, #order, #parent, #properties, #root, #section

Attributes included from Proxyable

#bindings

Instance Method Summary collapse

Methods inherited from Association

#associated_model_config, #associated_object_label_method, #associated_primary_key, #association, #foreign_key, #multiple?, #polymorphic?, #value, #virtual?

Methods inherited from Base

#association?, #editable?, #form_default_value, #form_value, #generic_field_help, #generic_help, #initialize, #inspect, #inverse_of, #optional, #optional=, #optional?, #parse_input, #type, #type_css_class, #value, #virtual?

Methods included from Groupable

#group

Methods included from Hideable

#hidden?, #hide, included, #show

Methods included from Configurable

#has_option?, #register_deprecated_instance_option, #register_instance_option

Methods included from Proxyable

#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



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

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

#method_nameObject



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

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