Skip to content

Instantly share code, notes, and snippets.

@aziz aziz/cancel.rb
Created Jun 19, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.