Sha256: cd1b56c479ecf49f69c3b186c46098bc274f063f9b968dfaf195ffb5a17eb3e5

Contents?: true

Size: 462 Bytes

Versions: 44

Compression:

Stored size: 462 Bytes

Contents

module Agilibox::FormBackUrl
  def back_url_tag
    tag(:input,
      :type  => "hidden",
      :name  => "back_url",
      :value => (params[:back_url].presence || request.referer),
    )
  end

  def form_tag_with_body(html_options, content)
    output = form_tag_html(html_options)
    output.safe_concat(back_url_tag)
    output << content
    output.safe_concat("</form>")
  end
end

ActionView::Helpers::FormTagHelper.send(:prepend, Agilibox::FormBackUrl)

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
agilibox-1.5.4 lib/agilibox/form_back_url.rb
agilibox-1.5.3 lib/agilibox/form_back_url.rb
agilibox-1.5.2 lib/agilibox/form_back_url.rb
agilibox-1.5.1 lib/agilibox/form_back_url.rb
agilibox-1.5.0 lib/agilibox/form_back_url.rb
agilibox-1.4.4 lib/agilibox/form_back_url.rb
agilibox-1.4.3 lib/agilibox/form_back_url.rb
agilibox-1.4.2 lib/agilibox/form_back_url.rb
agilibox-1.4.1 lib/agilibox/form_back_url.rb
agilibox-1.4.0 lib/agilibox/form_back_url.rb
agilibox-1.3.6 lib/agilibox/form_back_url.rb
agilibox-1.3.5 lib/agilibox/form_back_url.rb
agilibox-1.3.4 lib/agilibox/form_back_url.rb
agilibox-1.3.3 lib/agilibox/form_back_url.rb
agilibox-1.3.2 lib/agilibox/form_back_url.rb
agilibox-1.3.1 lib/agilibox/form_back_url.rb
agilibox-1.3.0 lib/agilibox/form_back_url.rb
agilibox-1.2.3 lib/agilibox/form_back_url.rb
agilibox-1.2.2 lib/agilibox/form_back_url.rb
agilibox-1.2.1 lib/agilibox/form_back_url.rb