ActiveModel::Model and Validation Callbacks

29 views
Skip to first unread message

Marcus Ilgner

unread,
Nov 9, 2015, 8:53:04 PM11/9/15
to Ruby on Rails: Core
Hello all,

I just noticed that when I `include ActiveModel::Model` in a class, I get the validation class methods from the `ActiveModel::Validations` concern but the class methods from `ActiveModel::Validations::Callbacks` are not included.
I'm not sure whether it's a bug - didn't expect this is behaviour myself - but maybe it was a conscious decision and everything works like it should.
If it turns out to be a bug, I'm willing to create the relevant patch, otherwise I'd be interested in the reason behind this - maybe there's some disadvantage from including the callbacks that I'm not seeing at the moment?

All the best
Marcus

Reply all
Reply to author
Forward
0 new messages