sort author email
This commit is contained in:
		
							parent
							
								
									59c0cdd761
								
							
						
					
					
						commit
						b4a99e58cf
					
				| 
						 | 
					@ -1,6 +1,8 @@
 | 
				
			||||||
class Desktop::CoAuthorsController < ApplicationController
 | 
					class Desktop::CoAuthorsController < ApplicationController
 | 
				
			||||||
  def index
 | 
					  def index
 | 
				
			||||||
    @co_authors = CoAuthor.where(name_id: current_user.id)
 | 
					    @co_authors = CoAuthor.where(name_id: current_user.id).order(["co_author desc"])
 | 
				
			||||||
 | 
					    nils, not_nils = @co_authors.partition {|p| p.email.nil? }
 | 
				
			||||||
 | 
					    @co_authors = not_nils + nils
 | 
				
			||||||
    @co_author_relations = CoAuthorRelation.all
 | 
					    @co_author_relations = CoAuthorRelation.all
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    respond_to do |format|
 | 
					    respond_to do |format|
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue