change_column :posts, :ID, :string, :null => false
I have used this after the add_column but when i leave the value as empty it does not show any error. why and what can i do to capture the error?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use validation inside your model:
And it better to do not use :id to store some string. This column name is reserved in Rails.