News for hackers. Stuff that matters.
Re:10 Most Common Rails Mistakes by rubiquity on Wednesday June 04, 2014 @12:28PM (#7846519)
> Anywhere you are doing `if some_obj` in view code you'll probably be doing `if some_obj.is_a? Guest` or `if some_obj.guest?` anyway.

Sorry, you're completely wrong. Polymorphism and duck typing exist specifically so that you don't have to do `is_a?` checks.

> but the thing that I've found messes up Rails applications is large model objects ("god objects"),

How do you think god object models get created in the first place? By not extracting out logic. When you have models that have very different state, you actually have very different objects. Those differences should be extracted into different classes.

There are no comments on this comment yet.