Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aziz
Created June 19, 2011 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aziz/1034581 to your computer and use it in GitHub Desktop.
Save aziz/1034581 to your computer and use it in GitHub Desktop.
cancel link helper
module ApplicationHelper
include Rails.application.routes.url_helpers
def cancel_link
return link_to 'Cancel', request.env["HTTP_REFERER"],
:class => 'cancel',
:confirm => 'Are you sure? Any changes will be lost.'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment