lib/dynamoid/associations/has_one.rb in dynamoid-1.3.4 vs lib/dynamoid/associations/has_one.rb in dynamoid-2.0.0
- old
+ new
@@ -17,23 +17,9 @@
key_name = options[:inverse_of] || source.class.to_s.singularize.underscore.to_sym
guess = target_class.associations[key_name]
return nil if guess.nil? || guess[:type] != :belongs_to
key_name
end
-
- # Associate a source object to this association.
- #
- # @since 0.2.0
- def associate_target(object)
- object.update_attribute(target_attribute, Set[source.hash_key])
- end
-
- # Disassociate a source object from this association.
- #
- # @since 0.2.0
- def disassociate_target(object)
- source.update_attribute(source_attribute, nil)
- end
end
end
end