Position the rafter on top of the support beam so the 2-inch side of the 2-by-4 touches the support beam. Mark the locations of the support beam on the rafter with a pencil. Where you mark it, use a saw to cut a 1/2-inch-deep notch into the rafter where it sits on top of the support beam. The notch will help keep the rafter in place.
Push the rafter down onto the support beam. The support beam should fit into the notches on the rafter.
Position a seismic anchor so one portion sits against the rafter and the other portion sits against the side of the support beam. Secure the seismic anchor with galvanized nails.