Hello,
in my application I have the model User which is managed through AS.
For obvious reason, I want to prevent the administrator from deleting
the last user. :-)
"Agile Development with Rails" suggests, in their example application
(which of course does not use AS) the following code in the model:
def after_destroy
raise "Can't destroy the last user"
end
This works in AS, as it effectively prevents the user to be deleted,
but instead of that error message, I get "Internal Error" in the AS
view.
What is the best way to achieve this under AS and to display an
informative error message to the user? Thank you!
Francesco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---