Sha256: b56d82283f3f86d68491730a57368e109f0549082a0adde4da5538a6cd753449

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

# Permission 是权限。

class Unidom::Authorization::Permission < ActiveRecord::Base

  self.table_name = 'unidom_permissions'

  has_many :authorizings, class_name: 'Unidom::Authorization::Authorizing'

  validates :name, presence:    true, length: { in: 2..self.columns_hash['name'].limit }
  validates :path, allow_blank: true, length: { in: 2..self.columns_hash['path'].limit }

  scope :path_is, ->(path) { where path: path }

  include Unidom::Common::Concerns::ModelExtension

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-authorization-0.1 app/models/unidom/authorization/permission.rb