Suppose I have the following namespace with a Base
module that defines some methods that can be reused
module MyNameSpace
module Magic
extend ActiveSupport::Concern
class_methods do
def magic_field(field_name)
# Defines methods and attributes based on field name
end
end
end
end
What is the difference (if there is any) between
module MyNameSpace
module Foo
extend ActiveSupport::Concern
include Magic
included do
magic_field(:foo)
end
end
end
and
module MyNameSpace
module Foo
extend ActiveSupport::Concern
included do
include Magic
magic_field(:foo)
end
end
end
(The question is about the difference of include Magic
being either outside or inside the included
block)