8
मैं एक चिंता यह है कि मैं इस तरह लिखा है कैसे हो सकता है:एक ActiveSupport में एक विधि ओवरलोडिंग :: चिंता
module Concerns
module MyConcern
extend ActiveSupport::Concern
...
def my_concern_magic(arg0,arg1)
#exciting stuff here
end
end
end
कि एक मॉडल है कि my_concern_magic
overloads में शामिल है? जैसे
class User
include Concerns::MyConcern
...
def my_concern_magic(arg0)
arg1 = [1,2,3]
my_concern_magic(arg0,arg1)
end
end
धन्यवाद एंड्रयू! एक जादू की तरह काम किया। –