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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles