refine co-authro page
This commit is contained in:
1 parent
5986817e16
commit
5dabfe9319
3 files changed
+7
-20
No files matched your search
@@ -55,27 +55,10 @@ class Desktop::CoAuthorsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
def destroy
|
||||
@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
|
||||
end
|
||||
|
||||
def get_co_authors_json
|
||||
@co_authors = CoAuthor.where(name_id: current_user.id)
|
||||
data = Array.new
|
||||
|
||||
@co_authors.each do |co_author|
|
||||
data << {
|
||||
author: co_author.co_author,
|
||||
email: co_author.email,
|
||||
type: co_author.type
|
||||
}
|
||||
end
|
||||
render json: JSON.pretty_generate(data)
|
||||
render :json => {success: true, msg: "Paper deleted successfully!"}
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user