rails change column type string to integer
change_column :people, :company_id, :integer
rails change column type string to integer
change_column :people, :company_id, :integer
ruby string to int
a = "42" # => '42'
a.to_i # => 42
# But if you might not have a number in your String, you should rather
# use this instead, as to_i doesn't throw an Error:
"42test123".to_i # => 42
Integer("42test123") # => ArgumentError
Integer("42") # => 42
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us