Checking input

Hi guys,

I want the user input only integer type. I don’t need string or empty input. How do I checking it?

Of course I need cycle, but I don’t understand Which expression to set?

Many thanks,

Yuriy

This should help
http://guides.rubyonrails.org/active_record_validations.html#numericality

Colin