Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Rob Saunders's Profile

GitHub User: robsaunders

Site: http://wearebrandnew.com

Comments by Rob Saunders

Avatar

Is it just me or is having a topic_attributes method on every class a terrible thing to do? It means you will have references to other classes, particularly global things like current_user, which should never be accessed inside your model, inside every single model you have.

I can see the code quickly devolving into spaghetti with references to relations and methods of current_user. It's adding inter-model dependencies for no reason, and moving a lot of the logic back into the model that strong parameters was designed specifically to avoid.

Avatar

You saved me hours of digging around. Thank you a billion trillion thank-you-based-thingers.