Module: ActionView::Helpers::FormTagHelper
- Defined in:
- lib/honeypot-captcha/form_tag_helper.rb
Instance Method Summary collapse
- #form_tag_html_with_honeypot(options) ⇒ Object (also: #form_tag_html)
Instance Method Details
#form_tag_html_with_honeypot(options) ⇒ Object Also known as: form_tag_html
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/honeypot-captcha/form_tag_helper.rb', line 5 def form_tag_html_with_honeypot() honeypot = .delete(:honeypot) || .delete('honeypot') html = form_tag_html_without_honeypot() if honeypot captcha = honey_pot_captcha if block_given? html.insert(html.index('</form>'), captcha) else html += captcha end end html end |