fixed delete function

This commit is contained in:
Rueshyna 2012-11-23 12:28:36 +08:00
parent e06495d4ad
commit 8009c6aa34
2 changed files with 9 additions and 4 deletions

View File

@ -57,10 +57,10 @@ class Desktop::CoAuthorsController < ApplicationController
@co_author = CoAuthor.find(params[:id])
@co_author.destroy
respond_to do |format|
format.html { redirect_to desktop_co_authors_url, :layout => false }
format.json { head :no_content }
end
#respond_to do |format|
# format.html { redirect_to desktop_co_authors_url, :layout => false }
# format.json { head :no_content }
#end
end
def get_co_authors_json

View File

@ -80,6 +80,11 @@ class Desktop::JournalPagesController < ApplicationController
end
end
def destroy
@writing_journal = WritingJournal.find(params[:id])
@writing_journal.destroy
end
def get_journals_json
publications = WritingJournal.where(create_user_id: current_user.id)