class Graphoid::ManyToMany
Public Instance Methods
create(parent, values, grapho)
click to toggle source
# File lib/graphoid/operators/inherited/many_to_many.rb, line 5 def create(parent, values, grapho) values.each do |value| attributes = Attribute.correct(klass, value) attributes[:"#{grapho.name}_ids"] = [parent.id] klass.create!(attributes) end end