Sha256: 77c4f32b3690f65d70a1661e986c2352dda98c4721caa0397afcd7a615d7f44a
Contents?: true
Size: 1.03 KB
Versions: 19
Compression:
Stored size: 1.03 KB
Contents
<!-- Used inside a form to specify where to redirect after successful submission. This works by inserting a hidden field called `after_submit` which is used by Hobo if present to perform a redirect after the form submission. ### Usage Use the `stay-here` attribute to remain on the current page: <form> <after-submit stay-here/> ... </form> Use the `uri` option to specify a redirect location: <form> <after-submit uri="/admin"/> ... </form> Use the `go-back` option to return to the page in `session[:previous_uri]`: <form> <after-submit go-back/> ... </form> Note that `session[:previous_uri]` isn't automatically populated. To automatically populate it, add to application_controller.rb: after_filter HoboRapid::PreviousUriFilter --> <def tag="after-submit" attrs="uri, stay-here, go-back"><% uri = "stay-here" if stay_here uri = session[:previous_uri] if go_back -%> <input type="hidden" value="¶ms[:after_submit] || uri" name="after_submit" if="&uri"/> </def>
Version data entries
19 entries across 19 versions & 1 rubygems