I'm sorry. The problem was the following code that another developer
had added:
class ApplicationController < ActionController::Base
prepend_around_filter :action_transaction
def action_transaction
ActiveRecord::Base.transaction do
yield
end
end
end
thanks anyway
--
You re
Yes I tried 'raise ActiveRecord::Rollback' without '.new', but i have
the same problem.
On Jul 23, 3:37 pm, Me wrote:
> Did you try 'raise ActiveRecord::Rollback' ?
>
> without the .new
>
> On Jul 23, 1:38 pm, Carlos Forero wrote:
>
>
>
ethod to
rollback the database transaction and pass on the exception"
On Jul 23, 1:06 pm, Me wrote:
> save! just throws an error if there is an issue. Do you have
> validations that are supposed to cause an exception in that case?
>
> On Jul 23, 10:45 am, Carlos Forero wrote:
>
>
With :
PostgreSQL 8.4 or postgresql-8.3
rails 2.3.4
pg 9.x or pg 8.x
I test this code:
=
class NkiBatch < ActiveRecord::Base
Bank.connection.transaction do
bank = Bank.new(:name => "ddsjdsjdsjk")
bank.save!
raise ActiveRecord::Rollback.new
e
4 matches
Mail list logo