rails 4 function trial