Create the dependent behaviour restrict_with_error

Causes an error to be added to the owner if there are any associated
objects.

It is the same behaviour we have on [AR](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many).