Here is the answer:
class MyController < ApplicationController
def my_method
# Lots of stuff
end
helper_method :my_method
end
Then, in your view, you can reference it in ERB exactly how you expect with <%
or <%=
:
<% my_method %>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…