Module: RailsAjax::FormTagHelper
- Included in:
- ActionView::Base
- Defined in:
- lib/rails-ajax/form_tag_helper.rb
Overview
Module defining methods to include in ActionView::Helpers::FormTagHelper
Instance Method Summary collapse
-
#form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
Replaces form_tag with an Ajax updated version.
Instance Method Details
#form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
Replaces form_tag with an Ajax updated version
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rails-ajax/form_tag_helper.rb', line 12 def form_tag( = {}, = {}, &block) if (RailsAjax.config.Enabled and RailsAjax::rails_ajaxifiable?()) if block_given? return super(, .merge({ :remote => true, :'data-rails-ajax-remote' => true })) do block.call end else return super(, .merge({ :remote => true, :'data-rails-ajax-remote' => true })) end elsif block_given? return super(, ) do block.call end else return super(, ) end end |