Skip to content

Commit

Permalink
Renamed ModelExtensions::Object to ...::ForObject (...::Subject as well)
Browse files Browse the repository at this point in the history
"Object" caused breakage in ActiveSupport superclass_delegating_reader (f.i.
partial_updates).

Found and fixed by invisiblelama, originally in
http://github.com/invisiblellama/acl9/commit/d0c56f8f9b5145f8a6c6ef769dbf2ced9bb6a787
  • Loading branch information
be9 committed Jan 4, 2010
1 parent 47b329d commit 2f4f72c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/acl9/model_extensions.rb
@@ -1,5 +1,5 @@
require File.join(File.dirname(__FILE__), 'model_extensions', 'subject')
require File.join(File.dirname(__FILE__), 'model_extensions', 'object')
require File.join(File.dirname(__FILE__), 'model_extensions', 'for_subject')
require File.join(File.dirname(__FILE__), 'model_extensions', 'for_object')

module Acl9
module ModelExtensions #:nodoc:
Expand Down Expand Up @@ -41,7 +41,7 @@ def acts_as_authorization_subject(options = {})
self._auth_role_class_name = role
self._auth_subject_class_name = self.to_s

include Acl9::ModelExtensions::Subject
include Acl9::ModelExtensions::ForSubject
end

# Add role query and set methods to the class (making it an auth object class).
Expand Down Expand Up @@ -91,7 +91,7 @@ def acts_as_authorization_object(options = {})
:counter_sql => ("SELECT COUNT(DISTINCT #{subj_table}.id)" + sql_tables + sql_where),
:readonly => true

include Acl9::ModelExtensions::Object
include Acl9::ModelExtensions::ForObject
end

# Make a class an auth role class.
Expand Down
@@ -1,6 +1,6 @@
module Acl9
module ModelExtensions
module Object
module ForObject
##
# Role check.
#
Expand Down
@@ -1,6 +1,6 @@
module Acl9
module ModelExtensions
module Subject
module ForSubject
##
# Role check.
#
Expand Down

0 comments on commit 2f4f72c

Please sign in to comment.