You may have ran into the following scenario that your rails app having 1+ domain models having image with them, say Album has one cover, User has one avatar:
As you can see, an image belongs to a viewable object, the viweable object could be an instance of User or Album or anything else.
The presumption here is that the cover is having a set of styles different from with the avatar, but we only have one Image class, what are we supposed to do? We dispatch. We let the viewable object decide the styles of the image.
We now have one Image class having different styles for different viewable objects, we can also do the same thing to default_url and path. Leave me a comment if you have better solution, thanks a lot.