I ran into some problems with Spree and saw this code, which mentions Spree::Product.create!
(rather than Spree::Product.create
without !
)
I would like to understand the differences between the 2 methods.
The bang versions (e.g. Spree::Product.create!) raise an exception if the record is invalid. The non-bang versions don’t: Spree::Product.create return false.