##// END OF EJS Templates
remove trailing white space from test/fixtures/workflows.yml...
remove trailing white space from test/fixtures/workflows.yml git-svn-id: http://svn.redmine.org/redmine/trunk@16339 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r15627:28b20270b4c2
r15957:7816a4025a03 master
Show More
078_add_custom_fields_position.rb
15 lines | 447 B | text/x-ruby | RubyLexer
/ db / migrate / 078_add_custom_fields_position.rb
Jean-Philippe Lang
Custom fields can now be reordered....
r888 class AddCustomFieldsPosition < ActiveRecord::Migration
def self.up
add_column(:custom_fields, :position, :integer, :default => 1)
Jean-Philippe Lang
Replaces find(:all) calls....
r10691 CustomField.all.group_by(&:type).each do |t, fields|
Jean-Philippe Lang
Custom fields can now be reordered....
r888 fields.each_with_index do |field, i|
# do not call model callbacks
Toshi MARUYAMA
use symbol instead of string for 'position' in db migrate (#24013)...
r15627 CustomField.where({:id => field.id}).update_all(:position => (i+1))
Jean-Philippe Lang
Custom fields can now be reordered....
r888 end
end
end
def self.down
remove_column :custom_fields, :position
end
end