Hey all, well I have a delete function in my rails application that
works successfully. When I click the button it deletes the record from
the page as well as the database, my problem is that I don't want it to
instantaneously do this, I want it to give the user the option to cancel
before hand. How would I do this. My code for the button is as followed:

_form.html.erb/games

<%= f.submit %>
    <%= button_to 'Destroy', root_url, :confirm => 'Sure?', :method =>
:delete %>


Application.html.erb

<head>
  <title>Wishlist</title>
  <%= stylesheet_link_tag    "/stylesheet/style", :media => "all"%>
  <%= javascript_include_tag :all %>
  <%= csrf_meta_tags %>
</head>

Anything I am missing?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to