Created
June 19, 2011 18:41
-
-
Save aziz/1034581 to your computer and use it in GitHub Desktop.
cancel link helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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