public
Rubygem
Description: Advanced seed data handling for Rails, combining the best practices of several methods together.
Homepage: http://mbleigh.lighthouseapp.com/projects/10223-seed-fu
Clone URL: git://github.com/mbleigh/seed-fu.git
Fixing ActiveRecord override
jcnetdev (author)
Fri Jul 04 12:01:42 -0700 2008
commit  6260b4a174ff69cc6fdf1818e1181dba03c4cab7
tree    16615bbd69e009dadd7b08b5a346013138c2e26c
parent  7bb6de5ca04b9575cf4ab7b9971ead3fb00ac8f1
...
62
63
64
 
 
 
 
 
 
 
 
 
 
 
 
65
...
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
0
@@ -62,3 +62,15 @@ module SeedFu
0
     end
0
   end
0
 end
0
+
0
+
0
+class ActiveRecord::Base
0
+  # Creates a single record of seed data for use
0
+  # with the db:seed rake task. 
0
+  # 
0
+  # === Parameters
0
+  # constraints :: Immutable reference attributes. Defaults to :id
0
+  def self.seed(*constraints, &block)
0
+    SeedFu::Seeder.plant(self, *constraints, &block)
0
+  end
0
+end
0
\ No newline at end of file

Comments