class RailsAdmin::Config::Fields::Types::HasOneAssociation

Public Instance Methods

editable?() click to toggle source
# File lib/rails_admin/config/fields/types/has_one_association.rb, line 20
def editable?
  (nested_form || abstract_model.model.new.respond_to?("#{self.name}_id=")) && super
end
method_name() click to toggle source
# File lib/rails_admin/config/fields/types/has_one_association.rb, line 28
def method_name
  nested_form ? "#{self.name}_attributes".to_sym  : "#{self.name}_id".to_sym
end
multiple?() click to toggle source
# File lib/rails_admin/config/fields/types/has_one_association.rb, line 32
def multiple?
  false
end
selected_id() click to toggle source
# File lib/rails_admin/config/fields/types/has_one_association.rb, line 24
def selected_id
  value.try :id
end