Forum: Rails Engines development Extending login engine

Posted by Jay Powers (Guest)
on 2006-06-16 20:59
(Received via mailing list)
I would like to add a few variables to an existing "login" method in
the login engine.  Is there an easy way to do that with out overriding
the whole method?  I also don't want to copy the whole method in my
class.

Thanks,
Posted by James Adam (Guest)
on 2006-06-18 16:28
(Received via mailing list)
Without know more about what you want to do, the answer is probably
not... if you want to add parameters to a method, you'll have to
redefine it.

- james
Posted by Jay Powers (Guest)
on 2006-06-19 19:22
(Received via mailing list)
Thanks.  I was looking into super.  I thought I could call that, but
my user_controller is not a child of the login engine's.  Oh well.

Jay
Posted by Jay Powers (Guest)
on 2006-06-19 22:29
(Received via mailing list)
FYI:  I use the alias_method which seems to work well.

alias_method :orig_login, :login

Then I can do my stuff and call orig_login from the login_engine.

-Jay
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.