how to keep a hash value in the table column in rails
The data type for that column must be text so in your migrations you can specify:
add_column :user_details, :additional_info, :text
Then in your model you have to specify that this column will contain a hash and you do that with the serialize command:
class UserDetail < ActiveRecord::Base
serialize :additional_info
After that you can save hash information.
@ud = UserDetail.new
@ud.additional_info = {:salary => 1000000}
@ud.save