Class: Basepack::Forms::Fields::BelongsToAssociation

Inherits:
SingleAssociation show all
Defined in:
lib/basepack/forms/fields/belongs_to_association.rb

Constant Summary

Constants inherited from Base

Basepack::Forms::Fields::Base::ASSOC_TYPES

Instance Attribute Summary

Attributes inherited from Base

#delegate, #form, #name

Instance Method Summary collapse

Methods inherited from SingleAssociation

#build_resource

Methods inherited from Base

#association?, #bulk_editable?, #configure_nested_form, #copy, #enum_options, #initialize, #inverse_of_nested_in?, #nested_label, #nform, #parse_input, #unique?, #update_attributes, #value, #view

Constructor Details

This class inherits a constructor from Basepack::Forms::Fields::Base

Instance Method Details

#selected_idObject



18
19
20
# File 'lib/basepack/forms/fields/belongs_to_association.rb', line 18

def selected_id
  form.resource.send(foreign_key)
end