lock middleware no longer exists in rails 4