comparison vendor/plugins/redmine_bibliography/app/controllers/publications_controller.rb @ 557:2fe129b04d82 feature_36

Fixes Bug #222.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 03 Aug 2011 16:09:27 +0100
parents 026c9747fe9b
children 735388da579a
comparison
equal deleted inserted replaced
556:ca9e8e562ea7 557:2fe129b04d82
224 end 224 end
225 225
226 render :layout => false 226 render :layout => false
227 end 227 end
228 228
229 def sort_authors 229 def sort_author_order
230 params[:authors].each_with_index do |id, index| 230 params[:authorships].each_with_index do |id, index|
231 Author.update_all(['order=?', index+1], ['id=?', id]) 231 Authorship.update_all(['auth_order=?', index+1], ['id=?', id])
232 end 232 end
233 render :nothing => true 233 render :nothing => true
234 end 234 end
235 235
236 def remove_from_project_list 236 def remove_from_project_list