method
first_or_create!
v3.2.8 -
Show latest stable
- Class:
ActiveRecord::Relation
first_or_create!(attributes = nil, options = {}, &block)public
Like first_or_create but calls create! so an exception is raised if the created record is invalid.
Expects arguments in the same format as Base.create!.