mbleigh / seed-fu
- Source
- Commits
- Network (13)
- Issues (9)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
-
Hi
We need to skip validation when saving our models, will you be adding this functionality
as in http://github.com/jcnetdev/seed-fu/tree/master?Thanks
Comments
-
Ability to execute Rails and plug-in code via seed_fu
1 comment Created 4 months ago by snoblenetTo seed the production database, sometimes we need to execute Rails or plug-in code in addition to creating a whole bunch of instances and assigning values to their variables.
For example, I use awesome_nested_set (http://github.com/collectiveidea/awesome_nested_set/tree/master). I would like to be able to do something in my code like this:
Thing.seed do |s| s.id = "2" s.save s.move_to_child_of(1) endComments
Actually, for awesome_nested_set users, this now works b/c of a change at their end.
http://github.com/collectiveidea/awesome_nested_set/issues/closed#issue/14
However, others may still want to execute code in seed_fu for other reasons.
-
I'm using postgres for my database. When seed records are created the primary key sequence should be updated - see http://railspikes.com/2009/3/6/duplicate-key-violates-unique-constraint for an explanation.
Comments
-
Currently I do
rake db:seedin my test helper to make sure the test database is populated with the necessary static data. It would be great to be able to call SeedFu.seed or something instead.Comments
-
Rake task db:seed conflicts with new rake task in Rails 2.3.4
0 comments Created 3 months ago by aldereteThe new (bare bones) seed data feature included with Rails 2.3.4 also uses a rake task of db:seed. This conflicts with the task used by seed_fu.
Suggest that the task be renamed db:seed_fu.
Comments
-
If I use the following code to make a model read-only:
class Permission < ActiveRecord::Base def readonly? return true end endthen its data doesn't seem to be able to be seeded (ActiveRecord::ReadOnlyRecord is thrown).
I suppose it makes sense really, but I wondered if there's a way to make Seed Fu override this setting, as seeding is the one time I actually want my read-only models to be writeable?
Comments
-
rake db:seed "negative argument" error after processing seed file with long name
0 comments Created 2 months ago by nothinghappensseed_fu_tasks.rake line 40:
puts "\n== Seed from #{pretty_name} " + ("=" * (60 - (17 + File.split(file).last.length)))errors out with a "negative argument" if the base filename (result of File.split(file).last.length) is over a certain length (43 characters).
Comments
-
The 1.2.1 gem doesn't contain ./tasks or any of it's files. It looks like it's missing from the gemspec.
Comments
-
SeedFu::Writer::Seed#add_seed calls chunk_this_seed? but this method is not defined.
Comments





Hey rfonglip,
There are a couple forks that have branched with that feature (and others), but this main tree seems to be pretty much abandoned.
Take a look at my fork: http://github.com/mixonic/seed-fu/commits/master/