A: I’d like to ask Ted for a favor to let me pass the exam. What do you say?
B: If you’re looking for someone to approve an exception, don’t go to Ted — he does everything by the book.
Note: This idiom means “in accordance with rules or regulations, following the rules exactly.” People say the book refers to the Bible. Shakespeare already used the term figuratively in Romeo and Juliet: “You kiss by the book.” Book in this expression is a set of established rules or, originally, of moral or religious precepts.