0

I have completed migrating database from sqlserver to mysql but it seems to have problems in rails. When i fetch record in rails console for eg:

 <AuthAdmin:0xb6e506f8 @attributes={"Status"=>"1", "LastUpdateSeqNo"=>nil, "CreationDate"=>"2005-08-03 22:53:57", "AuthAdminID"=>"8987", "PropertyID"=>nil, "Password"=>"trustbss", "LastUpdate"=>"2012-07-12 05:15:02", "UserType"=>"0", "LoginName"=>"dev"}

Now attributes such as CreationDate and AuthAdminID suppose to be date and integer are displaying as string.But when I do

  AuthAdmin.find(:first).AuthAdminID.class output is Fixnum

You can check record given above,it shows string. Now when i do arithmatic operation in my views caught issue string can't be coerced into Fixnum.Explicitly changing everything to their own TYPE is a very bad idea.

Hope that explain my problem. Look like no one come across this problem.

Chitrank Samaiya
  • 841
  • 10
  • 20
  • The first object notation is representing the value as a string but when accessing the property you seem to get the right value with the right type... so this seems to be working pretty well, right ? – Raindal Feb 21 '13 at 16:00
  • Yes, But incase you are sending data to view file and performing some operation it is recieved as a string. – Chitrank Samaiya Feb 21 '13 at 16:35

0 Answers0