Lets say I've Comment class that is polymorphic and I use it in many places within a system.
class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true attr_accessible :content end
And there is this one place in which I would like to apply validation on Comment's content length. How should I approach this problem?
1) Use STI and add new validation in subclass - I feel it is an overkill 2) Extend this single object being created/updated within controller with validation required. But how to achieve it without permanently extending its class?