public
Rubygem
Description: Demonstrates a reference implementation for handling role management
Homepage: http://www.pluginaweek.org
Clone URL: git://github.com/pluginaweek/has_roles.git
Change how the base module is included to prevent namespacing conflicts
obrie (author)
Sat Oct 04 14:50:34 -0700 2008
commit  9ecf1bdc704812c20579073766aebe1d1a2e76b3
tree    1c1b4e94e7b51ba021ac5f7ffaa69f062f757bdd
parent  0d2d298f24f82e509d972022441d8b135445f6f9
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 == master
0
 
0
+* Change how the base module is included to prevent namespacing conflicts
0
+
0
 == 0.1.1 / 2008-06-22
0
 
0
 * Remove log files from gems
...
3
4
5
6
7
8
9
10
11
12
13
14
...
46
47
48
49
 
50
...
3
4
5
 
 
 
 
 
 
6
7
8
...
40
41
42
 
43
44
0
@@ -3,12 +3,6 @@ require 'has_roles/authorization_helper'
0
 module PluginAWeek #:nodoc:
0
   # Adds a generic implementation for dealing with role management
0
   module HasRoles
0
-    def self.included(base) #:nodoc:
0
-      base.class_eval do
0
-        extend PluginAWeek::HasRoles::MacroMethods
0
-      end
0
-    end
0
-    
0
     module MacroMethods
0
       # Indicates that the model has roles. This will create the folliwng
0
       # association:
0
@@ -46,5 +40,5 @@ module PluginAWeek #:nodoc:
0
 end
0
 
0
 ActiveRecord::Base.class_eval do
0
-  include PluginAWeek::HasRoles
0
+  extend PluginAWeek::HasRoles::MacroMethods
0
 end

Comments