Creates an object just like Base.create but calls save! instead of save so an exception is raised if the record is invalid.
Source Code
# File active_record/validations.rb, line 904 def create!(attributes = nil) if attributes.is_a?(Array) attributes.collect { |attr| create!(attr) } else object = new(attributes) object.save! object end end
<code/>and<pre/>for code samples.