public
Rubygem
Description: Adds support for easily creating custom preferences for models
Homepage: http://www.pluginaweek.org
Clone URL: git://github.com/pluginaweek/preferences.git
Change how the base module is included to prevent namespacing conflicts
obrie (author)
Sat Oct 04 14:51:00 -0700 2008
commit  24b5b6165e0398903aa80c5716b312980c98bdc8
tree    80d0395f6bd89f5600e8821baa4030799825233f
parent  cfff9f26484b03039676ce3067f978f26d164983
...
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.3 / 2008-06-29
0
 
0
 * Add +prefs+ as an alias for +preferences+
...
21
22
23
24
25
26
27
28
29
30
31
32
...
286
287
288
289
 
290
...
21
22
23
 
 
 
 
 
 
24
25
26
...
280
281
282
 
283
284
0
@@ -21,12 +21,6 @@ module PluginAWeek #:nodoc:
0
   #   u.attributes = {:prefers_notifications => true}
0
   #   u.save!
0
   module Preferences
0
-    def self.included(base) #:nodoc:
0
-      base.class_eval do
0
-        extend PluginAWeek::Preferences::MacroMethods
0
-      end
0
-    end
0
-    
0
     module MacroMethods
0
       # Defines a new preference for all records in the model.  By default, preferences
0
       # are assumed to have a boolean data type, so all values will be typecasted
0
@@ -286,5 +280,5 @@ module PluginAWeek #:nodoc:
0
 end
0
 
0
 ActiveRecord::Base.class_eval do
0
-  include PluginAWeek::Preferences
0
+  extend PluginAWeek::Preferences::MacroMethods
0
 end

Comments