Added default sorted scope to Status, so whenever statuses are

retrieved without any ordering parameter, they should be sorted
automatically
pull/952/head
Sebastian Schuster 11 years ago
parent 2648dd5b0d
commit 9b2214589d
  1. 1
      app/models/status.rb

@ -31,6 +31,7 @@ class Status < ActiveRecord::Base
include ActiveModel::ForbiddenAttributesProtection
extend Pagination::Model
default_scope order('position ASC')
before_destroy :check_integrity
has_many :workflows, :foreign_key => "old_status_id"
acts_as_list

Loading…
Cancel
Save