Rails Seeds Made Simple with Seed-Fu: A Step-by-Step Guide
27-May-2019 2373
I was seeding some default data in a Rails app, but finding it increasingly difficult to maintain the data without generating duplicates or failing to delete some unnecessary records.Then I learned about the seed-fu gem, which helped me avoid such pitfalls and make the syntax look clean.In this post, I'll describe the issue I had with my original seeds, and walk you through how to use seed-fu. If you're using lots of find_or_intialize_by / find_or_create_by in your seeds, or finding it difficult to maintain your data integrity, this might be for you.
Rails Seeds Made Simple with Seed-Fu: A Step-by-Step Guide #ruby #rubydeveloper #rubyonrails #Rails #Seeds #Simple #Seed-Fu: #Step-by-Step #Guide #guide https://rubyonrails.ba/link/rails-seeds-made-simple-with-seed-fu-a-step-by-step-guide