当我在 form_for 中使用 Form Builder 生成一个按钮(使用 f.button)时,它会生成一个标题为“”的按钮。我想要做的是为这个标题添加一个前缀:“MyPrefix”。所以基本上我需要做的就是覆盖按钮方法(https://github.com/rails/rails/blob/488699166c3558963fa82d4689a35f8c3fd93f47/actionpack/lib/action_view/helpers/form_helper.rb#L1402)。但是我该怎么做呢?
谢谢!