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
感謝安德魯!像魅力一樣工作。 –