Sha256: 6cf9efe4f57e8cbf0fe85a7830099ecb756b8a4b222a59a748667a845cc881cc

Contents?: true

Size: 451 Bytes

Versions: 14

Compression:

Stored size: 451 Bytes

Contents

module Agilibox::FormBackUrl
  def back_url_tag
    tag(:input,
      :type => "hidden",
      :name => "back_url",
      :value => (params[:back_url] || 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

14 entries across 14 versions & 1 rubygems

Version Path
agilibox-1.0.13 lib/agilibox/form_back_url.rb
agilibox-1.0.12 lib/agilibox/form_back_url.rb
agilibox-1.0.11 lib/agilibox/form_back_url.rb
agilibox-1.0.10 lib/agilibox/form_back_url.rb
agilibox-1.0.9 lib/agilibox/form_back_url.rb
agilibox-1.0.8 lib/agilibox/form_back_url.rb
agilibox-1.0.7 lib/agilibox/form_back_url.rb
agilibox-1.0.6 lib/agilibox/form_back_url.rb
agilibox-1.0.5 lib/agilibox/form_back_url.rb
agilibox-1.0.4 lib/agilibox/form_back_url.rb
agilibox-1.0.3 lib/agilibox/form_back_url.rb
agilibox-1.0.2 lib/agilibox/form_back_url.rb
agilibox-1.0.1 lib/agilibox/form_back_url.rb
agilibox-1.0.0 lib/agilibox/form_back_url.rb