lib/cbac/known_permission.rb in cbac-0.6.3 vs lib/cbac/known_permission.rb in cbac-0.6.4

- old
+ new

@@ -1,15 +1,15 @@ -class Cbac::KnownPermission < ActiveRecord::Base - set_table_name "cbac_known_permissions" - attr_readonly :permission_type, :permission_number - - cattr_accessor :PERMISSION_TYPES - @@PERMISSION_TYPES = {:context => 0, :generic => 1} - - def self.find_context_permissions(conditions = {}) - all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:context])) - end - - def self.find_generic_permissions(conditions = {}) - all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:generic])) - end -end +class Cbac::KnownPermission < ActiveRecord::Base + set_table_name "cbac_known_permissions" + attr_readonly :permission_type, :permission_number + + cattr_accessor :PERMISSION_TYPES + @@PERMISSION_TYPES = {:context => 0, :generic => 1} + + def self.find_context_permissions(conditions = {}) + all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:context])) + end + + def self.find_generic_permissions(conditions = {}) + all(:conditions => conditions.merge(:permission_type => @@PERMISSION_TYPES[:generic])) + end +end