You make it in a wrong way, in your code you try co pass block (that doesn't exists) in method
in this case your either have to pass this to your helper method, or pass view context inside and delegate content_at
to this context.
Block delegation
module MyHelper
def helper_method1(a, b, &block)
MyModule.module_method1(a, b, &block)
end
end
def MyModule
include ActionView::Helpers::TagHelper
def self.module_method1(a, b, &block)
#......
my_tag = content_tag(:span, &block, class: "some_class123")
end
end
Pass view context
module MyHelper
def helper_method1(a, b)
MyModule.module_method1(a, b, self)
end
end
def MyModule
def self.module_method1(a, b, view_context)
my_tag = view_context.content_tag(:span, nil, class: "some_class123")
end
end
Take into account include ActionView::Helpers::TagHelper
is crucial in first example
You could check it out Using link_to in a class in a Rails helper it could be useful as well