Rails Seeds Made Simple with Seed-Fu: A Step-by-Step Guide

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 #guide https://rubyonrails.ba/single/rails-seeds-made-simple-with-seed-fu-a-step-by-step-guide

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles