I have User model and Feedback model and User model has user_type attribute.
Feedback model also has user_id attribute.I want to add user_type column to Feedback model the same as in User model.For instance after the migration it should be like that
User
id:123
user_type: "customer"
Feedback
id:56
user_id:123
user_type : "customer"
Why you are putting user_type in feedback table too. You can retrieve it from user_id by using rails association.
To retreive user_type from feedback object use
@feedback.user.user_type