hi, i am new user of ruby on rails
i have a problem in casting a variable in to int , my code is
@EmployeeTenure = Employeepersonaldetail.find_by_sql("select round
(DATEDIFF("date1,date2)/365,0) from table where EmployeeID = 0001)now if @EmployeeTenure is greater then 5 so make it 5 if (@EmployeeTenure .to_d>5) @EmployeeTenure=5 but there is an error so help me fixing the problem thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

