Is there some quick way to find out if any of a model’s fields or any fields of it’s nested models (a.k.a. associations) changed?
Share
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.
To see if a ActiveRecord object has changed, you can call:
To see if a specific attribute was changed, you can do:
where attr is the attribute you want to check.
To check for if a nested model changed, you can just do: