I think you can maybe nest lines 8-10 beneath line 12? It might make more sense organizationally, and then you don't need to set :article_id to nil just to set it to the real article.id later.