module ActiveRecordPermissions::Permissions

Public Instance Methods

existing_record_check?() click to toggle source

Because any class-level queries get delegated to the instance level via a new record, it’s useful to know when the authorization query is meant for a specific record or not. But using new_record? is confusing, even though accurate. So this is basically just a wrapper.

# File lib/active_scaffold/active_record_permissions.rb, line 73
def existing_record_check?
  !new_record?
end

Public Class Methods

included(base) click to toggle source
# File lib/active_scaffold/active_record_permissions.rb, line 65
def self.included(base)
  base.extend SecurityMethods
  base.send :include, SecurityMethods
end