lib/surrounded/context.rb in surrounded-0.6.0 vs lib/surrounded/context.rb in surrounded-0.7.0
- old
+ new
@@ -1,7 +1,8 @@
require 'set'
require 'surrounded/context/role_map'
+require 'surrounded/access_control'
# Some features are only available in versions of Ruby
# where this method is true
def module_method_rebinding?
return @__module_method_rebinding__ if defined?(@__module_method_rebinding__)
@@ -27,9 +28,13 @@
@default_role_type ||= :module
end
class << self
attr_writer :default_role_type
+ end
+
+ def protect_triggers
+ self.extend(::Surrounded::AccessControl)
end
def new(*args, &block)
instance = allocate
instance.send(:preinitialize)
\ No newline at end of file