On Mar 4, 11:13 pm, CFC <[email protected]> wrote:
> Hi
> I have an problem about before_* callbacks.
>
> I have a model named: Event
> And I don't want anyone to destroy or update any records in Event
> model.
[snip]
> But, it won't create any events but the auto_increment will be
> increment.
> Do anybody knows how to solve it?
>
> Thanks!

The problem you've run into is that the callbacks run inside a
transaction - throwing the ReadOnlyRecord exception rolls the whole
thing back (including the Event record).

Is there some reason that this can't be done in the UI? Just don't
provide the update and delete options...
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to