app/models/role.rb in enju_leaf-1.1.0 vs app/models/role.rb in enju_leaf-1.1.1
- old
+ new
@@ -1,7 +1,7 @@
class Role < ActiveRecord::Base
include MasterModel
- validates :name, presence: true, format: { with: /\A[A-Za-z][a-z_,]*[a-z]\Z/ }
+ 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