Closed bricker closed 11 years ago
You know what... I changed my mind about this. The developer can just manually load the seed file if they want in config.ru
with load Rails.root.join("db", "seeds.rb")
. I don't think this is a great addition to combustion.
This is useful when firing up the dummy app with Rack, so you can load in some data for when you're clicking around. Also very useful for engines that provide authentication, so you know you always have a login ready to go when you start the app. I was just doing it at the bottom of
db/schema.rb
before, but this makes a little more sense.The
COMBUSTION_SEED
constant is set and checked so the database doesn't get seeded when running tests. I'm not totally happy with this solution - if you want to merge this in and have a better suggestion for how to handle it, let me know!