Is there a reason why we don't create a
User model with
I mean, doing that would require more steps:
- Create a User migration with
- Create a Todo migration that removes
email and adds a reference to
- For production, we would first run a task that creates users/associations based on emails currently stored in todos.
- We can still look for
session[:current_email], but we can change that to
session[:user_id], since we need to locate a User record on session create.
I guess using a Ruby class is the most minimal code required to get the tests to pass, and offering the minimal amount of changes. Could that be the reason then?