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

Instance Method Details

#form_tag(url_for_options = {}, options = {}, &block) ⇒ Object

Replaces form_tag with an Ajax updated version



7
8
9
10
# File 'lib/rails-ajax/form_tag_helper.rb', line 7

def form_tag(url_for_options = {}, options = {}, &block)
  options.merge!({ :remote => true, :'data-rails-ajax-remote' => true }) if (RailsAjax.config.enabled? and RailsAjax.rails_ajaxifiable?(options))
  return super(url_for_options, options, &block)
end