public
Description: Makes your models act as textiled.
Homepage: http://errtheblog.com/posts/12-actsastextiled
Clone URL: git://github.com/defunkt/acts_as_textiled.git
make some fixes, tests for textilize pass
defunkt (author)
Mon Nov 27 18:48:40 -0800 2006
commit  a630c7ba48cf37f8e81bb9eb892bf78b712a266f
tree    d4666adb1d3cc37f6563ccee2476d1f67e6bbd10
parent  05deb92dbd4612621da85a0976ac93ab903ade95
...
8
9
10
 
11
12
13
...
39
40
41
42
 
43
44
45
...
8
9
10
11
12
13
14
...
40
41
42
 
43
44
45
46
0
@@ -8,6 +8,7 @@ module Err
0
       module ClassMethods
0
         def acts_as_textiled(*attrs)
0
           @textiled_attributes = []
0
+ def textiled_attributes; Array(@textiled_attributes) end
0
 
0
           ruled = Hash === attrs.last ? attrs.pop : {}
0
           attrs += ruled.keys
0
@@ -39,7 +40,7 @@ module Err
0
         end
0
 
0
         def textilize
0
- Array(@textiled_attributes).each { |attr| __send__(attr) }
0
+ self.class.textiled_attributes.each { |attr| __send__(attr) }
0
         end
0
 
0
         def reload

Comments

    No one has commented yet.