Class: Parameter
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Parameter
- Includes:
- Authorization
- Defined in:
- app/models/parameter.rb
Direct Known Subclasses
CommonParameter, DomainParameter, GroupParameter, HostParameter, OsParameter
Constant Summary collapse
- PRIORITY =
{:common_parameter => 0, :domain_parameter => 1, :os_parameter => 2, :group_parameter => 3 , :host_parameter => 4}
Instance Attribute Summary collapse
-
#nested ⇒ Object
Returns the value of attribute nested.
Class Method Summary collapse
Methods included from Authorization
#enforce_create_permissions, #enforce_destroy_permissions, #enforce_edit_permissions, #enforce_permissions, included, #permission_failed?
Instance Attribute Details
#nested ⇒ Object
Returns the value of attribute nested
10 11 12 |
# File 'app/models/parameter.rb', line 10 def nested @nested end |
Class Method Details
.reassign_priorities ⇒ Object
16 17 18 19 20 21 |
# File 'app/models/parameter.rb', line 16 def self.reassign_priorities # priorities will be reassigned because of after_initialize find_in_batches do |params| params.each { |param| param.update_attribute(:priority, param.priority) } end end |