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:
parent
aa58167486
commit
097ca3f1f8
1 changed files with 7 additions and 7 deletions
|
@ -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+.
|
||||
|
|
Loading…
Reference in a new issue