app/models/role.rb in enju_leaf-1.1.0.rc19 vs app/models/role.rb in enju_leaf-1.1.0.rc20
- old
+ new
@@ -1,7 +1,6 @@
class Role < ActiveRecord::Base
include MasterModel
- default_scope { order("roles.position") }
validates :name, presence: true, format: { with: /\A[A-Za-z][a-z_,]*[a-z]\Z/ }
has_many :user_has_roles
has_many :users, through: :user_has_roles
after_save :clear_all_cache
after_destroy :clear_all_cache