I’m new to Ruby on Rails and would like to know that, if there is a way to strict link_to :confirm for a specific page. Because I’m putting this in every page, but I don’t want it to show a confirm message in every page.
I’m adding the code here as well, but the formate it’s incorrect in the textbox.
link_to "Home",'/', :confirm => 'Clicking OK Will Discard Any Unsaved Changes. Click Cancel To Return To The Home Page.'
You can make a helper like this to restrict by controller_name and action: