I’m creating an AR object in my controller and then attempting to add
error messages to it:
@item.errors.add_to_base ‘No store is selected’
This works without error but when it comes time for AR to add the
record, it apparently initializes the errors because the message that I
added does not cause the AR add to fail as you would expect.
Even when there is a validation error in AR the message that I added
does not show up in the list of errors on the resulting page.
So, am I doing something wrong? If not, how can I add my controller
errors to the AR errors so that they are reported on the resulting page
(and cause AR to not add the record)?