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.9.1 lib/agilibox/form_back_url.rb
agilibox-1.9.0 lib/agilibox/form_back_url.rb
agilibox-1.8.0 lib/agilibox/form_back_url.rb
agilibox-1.7.4 lib/agilibox/form_back_url.rb
agilibox-1.7.3 lib/agilibox/form_back_url.rb
agilibox-1.7.2 lib/agilibox/form_back_url.rb
agilibox-1.7.1 lib/agilibox/form_back_url.rb
agilibox-1.7.0 lib/agilibox/form_back_url.rb
agilibox-1.6.2 lib/agilibox/form_back_url.rb
agilibox-1.6.1 lib/agilibox/form_back_url.rb
agilibox-1.6.0 lib/agilibox/form_back_url.rb
agilibox-1.5.13 lib/agilibox/form_back_url.rb
agilibox-1.5.12 lib/agilibox/form_back_url.rb
agilibox-1.5.11 lib/agilibox/form_back_url.rb
agilibox-1.5.10 lib/agilibox/form_back_url.rb
agilibox-1.5.9 lib/agilibox/form_back_url.rb
agilibox-1.5.8 lib/agilibox/form_back_url.rb
agilibox-1.5.7 lib/agilibox/form_back_url.rb
agilibox-1.5.6 lib/agilibox/form_back_url.rb
agilibox-1.5.5 lib/agilibox/form_back_url.rb