Sha256: 09bf2b29effea064511111173fa21001ceb9ac5ae9160119dbf7935881c48f35

Contents?: true

Size: 195 Bytes

Versions: 2

Compression:

Stored size: 195 Bytes

Contents

require 'active_record'

class PermissionPolicy < ActiveRecord::Base
  belongs_to :resource, polymorphic: true
  validates :resource_id, uniqueness: { scope: [:resource_id, :resource_type] }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
recurso-0.6.1 lib/recurso/models/permission_policy.rb
recurso-0.5.3 lib/recurso/models/permission_policy.rb