ruby code for som_input