On 29 Apr 2008, at 15:38, Praveen wrote:
>
> Hi All
> The docs mention that raising ActiveRecord::Rollback from within a
> ''transaction'' block causes the transaction to rollback
without
> reraising it. However, trying this in script/console gives this error:
>
> NameError: uninitialized constant ActiveRecord::Rollback
>
Well it''s defined in Activerecord''s base.rb (it just defined
as class
Rollback (but inside the AR module) which is why your search didn''t
find it).
and ActiveRecord::Rollback seems to exist for me.
Fred> Doing a recursive grep of /usr/lib/ruby doesn''t find any mention
of
> ActiveRecord::Rollback!! Am I doing something wrong? What''s the
> ''right'' way to rollback a transaction explicitly from
within a
> ''transaction'' block?
>
> thanks
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
> -~----------~----~----~----~------~----~------~--~---
>