Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/app/controllers/authorships_controller.rb @ 1391:8580d1d1150e luisf
Adding 2 new js scripts; added the code removed from the partials. Minor cleaning.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 25 Sep 2013 17:44:48 +0100 |
parents | 4d5d25039a5f |
children |
line wrap: on
line source
class AuthorshipsController < ApplicationController def sort @authorships = Authorship.find(params['authorship']) @authorships.each do |authorship| # note: auth_order is usually called position (default column name in the acts_as_list plugin ) authorship.auth_order = params['authorship'].index(authorship.id.to_s) + 1 authorship.save end render :nothing => true, :status => 200 end end