method
create
create(attrs = {})
public
Hide source
# File activerecord/lib/active_record/associations/association_collection.rb, line 241 def create(attrs = {}) if attrs.is_a?(Array) attrs.collect { |attr| create(attr) } else create_record(attrs) do |record| yield(record) if block_given? record.save end end end