tk21769,

it sounds like you are building a lean to addition. Yes, the ridgebeam should be lagged to the 2x4 wallstuds. I don't think blocking is necessary. You should sink the lags and put a wood plug on the hole. Will look like pegs and you will not see the fasteners. Have fun.

And welcome to the TFG Forum.