8
Làm thế nào tôi có thể có một mối quan tâm mà tôi đã viết như thế này:Overloading một phương pháp trong một ActiveSupport :: Lo ngại
module Concerns
module MyConcern
extend ActiveSupport::Concern
...
def my_concern_magic(arg0,arg1)
#exciting stuff here
end
end
end
được bao gồm trong một mô hình quá tải my_concern_magic
? Ví dụ.
class User
include Concerns::MyConcern
...
def my_concern_magic(arg0)
arg1 = [1,2,3]
my_concern_magic(arg0,arg1)
end
end
Cảm ơn Andrew! Làm việc như người ở. –