# application_helper.rb
def do_some_stuff
...
end
# my_model.rb
def my_model_method
# I want to call the method "do_some_stuff" here, how exactly?
end
显然,我不能只调用do_some_stuff
,因为它会告诉我模型没有这个方法。
# application_helper.rb
def do_some_stuff
...
end
# my_model.rb
def my_model_method
# I want to call the method "do_some_stuff" here, how exactly?
end
显然,我不能只调用do_some_stuff
,因为它会告诉我模型没有这个方法。