First locate the model number of your Ryobi Miter saw... then search Google for Ryobi Miter saw replacement parts... one result I got is below:
Try that link, select your Ryobi saw model and zoom into the provided drawings so you can locate the switch, screws, and spring (if needed). The part numbers are supplied and you can order them online easily on that same link... Then just repair your saw with the new parts. As you already noticed, the saw is easy to disassemble and get access to the parts for repair. Have fun and good luck...
RYOBI Miter Saw Parts