Sha256: 8aca1008823bdc8f1e4c0872e6b3ca40f5feed2f7dbe175eba79e3f5384bb140

Contents?: true

Size: 455 Bytes

Versions: 23

Compression:

Stored size: 455 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.prepend(Agilibox::FormBackUrl)

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
agilibox-1.11.0 lib/agilibox/form_back_url.rb
agilibox-1.10.5 lib/agilibox/form_back_url.rb
agilibox-1.10.2 lib/agilibox/form_back_url.rb
agilibox-1.10.1 lib/agilibox/form_back_url.rb
agilibox-1.10.0 lib/agilibox/form_back_url.rb
agilibox-1.9.20 lib/agilibox/form_back_url.rb
agilibox-1.9.19 lib/agilibox/form_back_url.rb
agilibox-1.9.18 lib/agilibox/form_back_url.rb
agilibox-1.9.17 lib/agilibox/form_back_url.rb
agilibox-1.9.16 lib/agilibox/form_back_url.rb
agilibox-1.9.15 lib/agilibox/form_back_url.rb
agilibox-1.9.14 lib/agilibox/form_back_url.rb
agilibox-1.9.13 lib/agilibox/form_back_url.rb
agilibox-1.9.12 lib/agilibox/form_back_url.rb
agilibox-1.9.11 lib/agilibox/form_back_url.rb
agilibox-1.9.10 lib/agilibox/form_back_url.rb
agilibox-1.9.9 lib/agilibox/form_back_url.rb
agilibox-1.9.8 lib/agilibox/form_back_url.rb
agilibox-1.9.7 lib/agilibox/form_back_url.rb
agilibox-1.9.6 lib/agilibox/form_back_url.rb