Refactoring a Single Rails Model with large methods & long join queries trying to do everything
- by Kelseydh
I have a working Ruby on Rails Model that I suspect is inefficient, hard to maintain, and full of unnecessary SQL join queries. I want to optimize and refactor this Model (Quiz.rb) to comply with Rails best practices, but I'm not sure how I should do it.
The Rails app is a game that has Missions with many Stages. Users complete Stages by answering…