Module: ArsecurityDefault

Includes:
Arsecurity
Defined in:
lib/arsecurity_default.rb

Constant Summary collapse

CLASS_READ_METHOD =

value can be regexp, symbol or string

["find_every", "count"]
CLASS_DELETE_METHOD =
"delete_all"
CLASS_UPDATE_METHOD =
"update_all"
INSTANCE_CREATE =
{:create => :create}
INSTANCE_DELETE =
{:delete => /^destroy$/}
INSTANCE_UPDATE =
{:update => :update}
CLASS_READ =
{:read => CLASS_READ_METHOD}
CLASS_DELETE =
{:delete => CLASS_DELETE_METHOD}
CLASS_UPDATE =
{:update => CLASS_UPDATE_METHOD}
INCLUDE_I_METHODS =
INSTANCE_CREATE.merge(INSTANCE_UPDATE).merge(INSTANCE_DELETE)
INCLUDE_S_METHODS =
CLASS_READ.merge(CLASS_UPDATE).merge(CLASS_DELETE)

Constants included from Arsecurity

Arsecurity::CREATE, Arsecurity::DELETE, Arsecurity::READ, Arsecurity::UPDATE

Class Method Summary collapse

Methods included from Arsecurity

#rinter_create_around, #rinter_delete_around, #rinter_update_around

Class Method Details

.rinter_before_include_class(base) ⇒ Object



16
17
18
19
# File 'lib/arsecurity_default.rb', line 16

def self.rinter_before_include_class(base)
  base.instance_variable_set(:@include_i_methods, INCLUDE_I_METHODS)
  base.instance_variable_set(:@include_s_methods, INCLUDE_S_METHODS)
end