Created
June 23, 2013 17:00
-
-
Save anonymous/5845719 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ No route matches {:controller=>"users/cms", :action=>"neighbourhood_attractions_destroy"} - <td><%= link_to 'Destroy', cms_neighbourhood_attractions_delete_path, method: :delete, data: { confirm: 'Are you sure?' } %></td> ------------------------------- routes.rb: delete "admin/neighbourhood_attractions/delete/:id" => "users/cms#neighbourhood_attractions_destroy", :as => :cms_neighbourhood_attractions_delete ---------------------------------- users/cms_controller.rb: def neighbourhood_attractions_destroy NeighbourhoodAttraction.destroy(params[:id]) redirect_to :action => "neighbourhood_attractions_index", notice: 'Neighbourhood attraction was successfully deleted.' end