Class: RailsAdmin::Config::Fields::Types::HasManyAssociation
- Inherits:
-
Association
- Object
- Base
- Base
- Association
- RailsAdmin::Config::Fields::Types::HasManyAssociation
- Defined in:
- lib/rails_admin/config/fields/types/has_many_association.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#defined, #name, #order, #properties
Attributes inherited from Base
#abstract_model, #bindings, #parent, #root
Instance Method Summary collapse
- #dom_name ⇒ Object
-
#errors ⇒ Object
Reader for validation errors of the bound object.
- #method_name ⇒ Object
Methods inherited from Association
#associated_label_method, #associated_model_config, #association, #child_key, inherited, #inverse_of, #polymorphic?, #value
Methods inherited from Base
#association?, #column_css_class, #dom_id, #has_errors?, inherited, #initialize, #optional, #optional=, #optional?, #type, #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
#dom_name ⇒ Object
25 26 27 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 25 def dom_name "#{super}[]" # model_name[name_ids][] end |
#errors ⇒ Object
Reader for validation errors of the bound object
34 35 36 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 34 def errors bindings[:object].errors[name] end |
#method_name ⇒ Object
29 30 31 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 29 def method_name "#{super.to_s.singularize}_ids" # name_ids end |