Displaying 1 result from an estimated 1 matches for "primary_email".
2007 Apr 04
1
pontential bug in rspec_on_rails and ActiveRecord transactions
...ec-users,
I''ve encountered a strange bug in rspec, but it may be me who is wrong.
I''m running latest version from the trunk (r1678) of both rspec and
rspec_on_rails.
Please consider the following model:
class Url < ActiveRecord::Base
def after_save
Contact.create!(:primary_email => ''user at example.com'')
raise ActiveRecord::RecordInvalid.new(self)
end
end
Basically what it does is that in after_save it will insert a new
contact into database but after the exception has been raised, the Rails
will make a rollback on transaction.
Running in c...