I have created database migration, and migrated data both on development and production servers. I would like to populate database from the application, if it is empty and avoid rake db:seed and other similar methods. I know that it could be done through rake db:seed, but since application is already deployed I would not like to pollute deploy.rb for capistrano, or do it manually on both development and production.
Is there any hook on database open or initialization of Active Record where I can do something like
if !Pages.first
Pages.populate
end
I am aware of all recommended methods to populate database, but I would still prefer to do it from app.
Thanks