News for hackers. Stuff that matters.
Re:Keep Your ORM Out of my Controller by endlessvoid94 on Thursday August 26, 2010 @02:45PM (#1636786)
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.

Re:Keep Your ORM Out of my Controller by chrismsnz on Thursday August 26, 2010 @05:38PM (#1637238)
So you're using ORM specific functionality in the controller? :)
Re:Keep Your ORM Out of my Controller by endlessvoid94 on Thursday August 26, 2010 @05:44PM (#1637251)
I...guess so.

But it successfully removes the reason that becomes painful and leaky, e.g., queries. The function names are short and readable, and the execution of the query is in the ORM where it belongs.

Re:Keep Your ORM Out of my Controller by endlessvoid94 on Thursday August 26, 2010 @04:22PM (#1637052)
I guess I'm being downvoted for contributing to the discussion?