hpjaj/Mind-on-Rails — pull request #5 by hpjaj (2014-10-19 03:37:37+00:00)
Title: Need to have new note form cancel button skip confirmation

Hey Eliot,
When you are in the new note form creating a new note, and you have **not** met all the validations, and you hit the cancel button, the validation message pops up, and you cannot cancel out of the note. The only way to get out of the screen is to click a link in the navbar.

Is there a way to skip the confirmation being done in this case? I know that devise offers the `skip_confirmation!` command. I tried using it, but to no avail. I even tried creating a custom method in the notes_controller, and enlisting it, but that did not work either. Couldn't figure out the syntax to force the button to:

1. skip confirmation, then
2. redirect to xyz

Can you please take a look at `app/views/notes/_form.html.erb`, line 42, and tell me what you think?

Thanks,
Harry