Class: Ability::TopicResourceType
- Inherits:
-
Permission::ResourceType
- Object
- Permission::ResourceType
- Ability::TopicResourceType
- Defined in:
- app/models/ability.rb
Instance Method Summary collapse
- #actions ⇒ Object
-
#initialize ⇒ TopicResourceType
constructor
A new instance of TopicResourceType.
- #resources ⇒ Object
Methods inherited from Permission::ResourceType
#add_ability, #compare, for_class, #has_resource_list?, #role_can?, #roles_can?, #roles_permissions
Constructor Details
#initialize ⇒ TopicResourceType
Returns a new instance of TopicResourceType.
30 31 32 |
# File 'app/models/ability.rb', line 30 def initialize super(Topic, 'Topic') end |
Instance Method Details
#actions ⇒ Object
34 35 36 37 38 39 40 |
# File 'app/models/ability.rb', line 34 def actions [ :index, #display in TOC, but needs login for viewing :show, #Full WebGIS access (implies [:index]) :edit #Edit in admin backend or spatial editing (implies [:index, :show]) ] end |
#resources ⇒ Object
42 43 44 |
# File 'app/models/ability.rb', line 42 def resources Topic.select("id,name") end |