Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Dave's Profile

GitHub User: dolan

Comments by Dave

Avatar

The if-block method couples the find_commentable to the thing that is commentable. If you add another one tomorrow then you have to go add another case. While that's ok in an app with an app level controller, if you have something like a mountable engine, you'll have to pick a convention and stick with it, sans-special knowledge of 'all things commentable.'