Hi all,
I have a basic noobie question, but I can’t find my answer. I’ve
installed the acts as authenticated plug-in, and its incredibly easy
to use. My only issue is that it doesn’t give explicit exceptions for
different conditions of a login failure. For instance, if a login id
doesn’t exist, I’d like to raise the “NoSuchUser” exception, if they
haven’t confirmed registration, I’d like to raise the
“UserNotActivated” exception. These error are raised in the user
model, and I’d like to catch them in the controller and flash the
appropriate message. Where in the rails framework layout would I
define the exception classes? I’d like to keep a class file per ruby
file for cleaner code, and it doesn’t seem that they belong in the
“app” directory.