Class: RailsAdmin::Config::Fields::Types::HasManyAssociation
- Inherits:
-
Association
- Object
- Base
- Association
- RailsAdmin::Config::Fields::Types::HasManyAssociation
- Defined in:
- lib/rails_admin/config/fields/types/has_many_association.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Base::NAMED_INSTANCE_VARIABLES
Instance Attribute Summary
Attributes inherited from Base
#abstract_model, #defined, #name, #order, #parent, #properties, #root, #section
Instance Method Summary collapse
- #associated_prepopulate_params ⇒ Object
-
#errors ⇒ Object
Reader for validation errors of the bound object.
- #method_name ⇒ Object
Methods inherited from Association
#associated_model_config, #associated_model_limit, #associated_object_label_method, #associated_primary_key, #association, #multiple?, #polymorphic?, #value, #virtual?
Methods inherited from Base
#association?, #eager_load_values, #editable?, #filter_options, #form_default_value, #form_value, #generic_field_help, #generic_help, #initialize, #inverse_of, #optional, #optional=, #optional?, #parse_input, #parse_value, #sort_column, #type, #type_css_class, #value, #virtual?
Methods included from Inspectable
Methods included from Groupable
Methods included from Hideable
#hidden?, #hide, included, #show
Methods included from Configurable
#has_option?, included, #register_deprecated_instance_option, #register_instance_option
Methods included from Proxyable
Constructor Details
This class inherits a constructor from RailsAdmin::Config::Fields::Base
Instance Method Details
#associated_prepopulate_params ⇒ Object
31 32 33 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 31 def associated_prepopulate_params {associated_model_config.abstract_model.param_key => {association.foreign_key => bindings[:object].try(:id)}} end |
#errors ⇒ Object
Reader for validation errors of the bound object
27 28 29 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 27 def errors bindings[:object].errors[name] end |
#method_name ⇒ Object
22 23 24 |
# File 'lib/rails_admin/config/fields/types/has_many_association.rb', line 22 def method_name nested_form ? "#{name}_attributes".to_sym : super end |