RailsCasts Pro episodes are now free!

Learn more or hide this

Dave's Profile

GitHub User: dolan

Comments by Dave


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.'