1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use AS::Concern in ActiveModel

This commit is contained in:
Joshua Peek 2009-05-29 17:23:38 -05:00
parent e767c65cc9
commit e7d6f48ea9
2 changed files with 6 additions and 9 deletions

View file

@ -1,9 +1,10 @@
module ActiveModel
module Validations
def self.included(base) # :nodoc:
base.extend(ClassMethods)
base.__send__(:include, ActiveSupport::Callbacks)
base.define_callbacks :validate
extend ActiveSupport::Concern
include ActiveSupport::Callbacks
included do
define_callbacks :validate
end
module ClassMethods

View file

@ -1,10 +1,6 @@
module ActiveModel
module ValidationsRepairHelper
def self.included(base)
base.class_eval do
extend ClassMethods
end
end
extend ActiveSupport::Concern
module Toolbox
def self.record_validations(*model_classes)