Check out example codes for "create rails app with mysql database". It will help you in understanding the concepts better.

Code Example 1

rails new app_name -d mysql

Learn ReactJs, React Native from akashmittal.com