pepe wrote in post #960118:
>
> I am guessing that you are planning on using later on the message that
> you are raising. Why not just add the error to your memo object errors
> and then check in your controller if your memo.errors is empty or not?
>
> pepe
Thanks for both suggestion. Again, first
> def create_memo
> #does stuff and if there is an error not in validations
> ...
> raise ActiveRecord::Rollback, 'Memo was NOT created. Payment exceeds
> balance due'
> ...
> end
> Steve
I am guessing that you are planning on using later on the message that
you are raising. Why not just a
On Nov 7, 4:38 pm, Steve Alex wrote:
> I had create_memo return nil or error message and raised the exception
> in the controller, but that does not seem to be the best way - but it
> works.
>
> The basic question is "How do I tell if a transaction was committed or
> rolled back?"
>
If I were y
3 matches
Mail list logo