Mercurial > hg > soundsoftware-site
comparison plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 1406:20235e6c60c0 biblio_alt_search_auth
Correctly deleting publications.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 30 Sep 2013 18:29:35 +0100 |
parents | 43b303a229e1 |
children | 6487f22bee9d |
comparison
equal
deleted
inserted
replaced
1405:43b303a229e1 | 1406:20235e6c60c0 |
---|---|
281 page.replace_html "list_projects", :partial => 'list_projects', :id => @publication | 281 page.replace_html "list_projects", :partial => 'list_projects', :id => @publication |
282 } | 282 } |
283 end | 283 end |
284 | 284 |
285 def destroy | 285 def destroy |
286 find_project_by_project_id | 286 find_project_by_project_id unless params[:project_id].nil? |
287 | 287 @publication = Publication.find(params[:id]) |
288 | 288 |
289 @publication.destroy | 289 @publication.destroy |
290 | 290 |
291 flash[:notice] = "Successfully deleted Publication." | 291 flash[:notice] = "Successfully deleted Publication." |
292 redirect_to :controller => :publications, :action => 'index', :project_id => @project | 292 redirect_to :controller => :publications, :action => 'index', :project_id => @project |