Check out example codes for "rails comparar string to integer". It will help you in understanding the concepts better.

Code Example 1

val1 == val2.to_i

Learn ReactJs, React Native from akashmittal.com