I’d like to run a script that does some evaluation of user-entered data after it is successfully created. I have a model representing the data, but how do I specify that the model class should execute function X after an instance is successfully created?
Part 2: would it be more appropriate to put the code I want to execute in with the model or with the helper?
Thanks for your help 🙂
I believe you want an
after_createcallback in the model.http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html#M001375