The surest way to avoid an affair is to flee temptation as soon as it confronts you. Author Jerry Jenkins has referred to this determination to preserve moral purity as building hedges around marriage so that temptation is never given a foothold. You take steps to protect yourself and enhance the level of trust in your marriage at the same time.
To build a hedge around your home, talk with your partner about your interactions with the opposite sex; then establish sensible, sensitive guidelines. Some couples rule out lunch with a coworker, traveling together, talking alone behind closed doors, sharing rides, or working as a couple on a project. Agree on what you both consider reasonable, then stick to that agreement. If you're faced with a situation that you haven't discussed, ask your spouse about it beforehand, and if he or she isn't comfortable with it, don't do it. Listen to each other's concerns. The Lord has made you one flesh for good reason.
It may be harmless to show a bit of friendliness to a member of the opposite sex, but avoid crossing the line into flirting. Ask yourself, "Would my spouse feel comfortable if he or she witnessed this exchange? Would my actions earn trust, or would they raise doubt about my motives?"