Ruby Ohm: do not raise unique index violation, just return false -
When I try to save a unique feature, it generates an error if the feature is not unique Is there any way that instead of raising the error, just false change can be returned?
This is the type of code I want, but if a domain is not unique, then it raises an error, so it's never other
section:
domain = domain.new (: domain = & gt; root_domain) if domain ) Finally use the Ruby Rescue:
Domain.save Domain Rescue Om: UIINDEXExIllation Returns False and
Comments
Post a Comment