I have a custom validation method that I only want executed on create:
validate :post_count, :on => :create
def post_count
# validate stuff
end
However, it’s getting fired on update (in addition to on create).
Does the :on => :create option not work with custom validation methods?
As far as I know, there’s no
:onoption. Useinstead. And there’s
validate_on_updatealso. You can read about this methods here.