#validate does not seem to work correctly with :on => :create/:update
- by Tobias
Greetings,
I have a custom validation in my exemplary Movie model:
class Movie < ActiveRecord::Base
validate :it, :on => :create
private
def it
self.errors.add 'foo', 'bar'
end
end
This works on movie creation but also on updating an existing movie. :on => :update will also work for both. Might that be a bug or am I missing something?
Best regards
Tobias