I hate rails. But one thing I like is that activerecord will build functions for you. e.g.:
User.find_by_email(email)
I've started writing these types of functions manually now and it makes EVERYTHING so much simpler.
I never thought I'd say it...but...thank you rails.