8
어떻게 내가 이런 식으로 작성한 우려를 가질 수 있습니다 my_concern_magic
과부하 모델에 포함되어ActiveSupport에 방법을 과부하 :: 우려
module Concerns
module MyConcern
extend ActiveSupport::Concern
...
def my_concern_magic(arg0,arg1)
#exciting stuff here
end
end
end
? 예 : 모듈을 포함하여 이후
class User
include Concerns::MyConcern
...
def my_concern_magic(arg0)
arg1 = [1,2,3]
my_concern_magic(arg0,arg1)
end
end
감사 앤드류를! 매력처럼 일했습니다. –