method

create

Importance_0
v2.3.8 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::AssociationCollection
create(attrs = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

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
Register or log in to add new notes.