modified blogs_controller