method
build
build(attributes = {}, &block)
public
Hide source
# File activerecord/lib/active_record/associations/association_collection.rb, line 94 def build(attributes = {}, &block) if attributes.is_a?(Array) attributes.collect { |attr| build(attr, &block) } else build_record(attributes) do |record| block.call(record) if block_given? set_belongs_to_association_for(record) end end end