The only right way to attach a ledger is to bolt it to the studs of the house!! While I was doing this work in the picture, a person died from a deck that broke away from the house. They found that the contractor they hired, a few years ago to build their deck, nailed the ledger to the house!! A big no no!! Unfortunately they could not find the paper work on who did the work. Always keep you contractor paper work!!! That contractor was liable for that death.