Module: ActionView::Helpers::FormHelper
- Defined in:
- lib/multi_submit_check.rb
Instance Method Summary collapse
-
#form_tag_in_block(html_options, &block) ⇒ Object
覆写form_tag_in_block方法.
Instance Method Details
#form_tag_in_block(html_options, &block) ⇒ Object
覆写form_tag_in_block方法
47 48 49 50 51 52 53 54 55 |
# File 'lib/multi_submit_check.rb', line 47 def form_tag_in_block(, &block) content = capture(&block) output = form_tag_html() if (Rails.configuration.multiple_submit_check rescue false) output << token_field #给form_tag方法添加验证是否重复提交表单的hash串 end output << content output.safe_concat("</form>") end |