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

Use ActiveSupport::Concern instead of the traditinal way

This commit is contained in:
Yukio Mizuta 2014-08-24 14:51:46 -07:00
parent aa58167486
commit 097ca3f1f8

View file

@ -56,13 +56,13 @@ module ActiveModel
# refer to the specific modules included in <tt>ActiveModel::Model</tt>
# (see below).
module Model
def self.included(base) #:nodoc:
base.class_eval do
extend ActiveModel::Naming
extend ActiveModel::Translation
include ActiveModel::Validations
include ActiveModel::Conversion
end
extend ActiveSupport::Concern
include ActiveModel::Validations
include ActiveModel::Conversion
included do
extend ActiveModel::Naming
extend ActiveModel::Translation
end
# Initializes a new model with the given +params+.