Class: Setting::SettingPermission

Inherits:
Struct
  • Object
show all
Defined in:
app/models/setting.rb

Overview

CanCanCan integration
Create a simple struct to represent a setting for authorization

Instance Attribute Summary collapse

Delegated Instance Attributes collapse

Class Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



151
152
153
# File 'app/models/setting.rb', line 151

def key
  @key
end

Class Method Details

.model_nameObject



154
155
156
# File 'app/models/setting.rb', line 154

def self.model_name
  Setting.model_name
end

Instance Method Details

#model_nameObject

Alias for Setting#model_name

Returns:

  • (Object)

    Setting#model_name

See Also:



152
# File 'app/models/setting.rb', line 152

delegate :model_name, to: :Setting