I was trying to avoid adding all that logic in routes.rb and make it look more clean/understandable. I also think showing both approaches work best for new users. I can make it a proc if you want.