fixed delete function
This commit is contained in:
parent
e06495d4ad
commit
8009c6aa34
|
@ -57,10 +57,10 @@ class Desktop::CoAuthorsController < ApplicationController
|
||||||
@co_author = CoAuthor.find(params[:id])
|
@co_author = CoAuthor.find(params[:id])
|
||||||
@co_author.destroy
|
@co_author.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
#respond_to do |format|
|
||||||
format.html { redirect_to desktop_co_authors_url, :layout => false }
|
# format.html { redirect_to desktop_co_authors_url, :layout => false }
|
||||||
format.json { head :no_content }
|
# format.json { head :no_content }
|
||||||
end
|
#end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_co_authors_json
|
def get_co_authors_json
|
||||||
|
|
|
@ -80,6 +80,11 @@ class Desktop::JournalPagesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@writing_journal = WritingJournal.find(params[:id])
|
||||||
|
@writing_journal.destroy
|
||||||
|
end
|
||||||
|
|
||||||
def get_journals_json
|
def get_journals_json
|
||||||
publications = WritingJournal.where(create_user_id: current_user.id)
|
publications = WritingJournal.where(create_user_id: current_user.id)
|
||||||
|
|
||||||
|
|
Reference in New Issue