Topic: Find Or Create By (attribute) how can i tell if its a new record?
Im using find or create by to create some events in a table.
event = user.events.find_or_create_by_x
(x being the attribute)
Is there a way i can find out if this find or create action returns an existing record or creates a new record?
I was thinking of doing something with the event.id and tracking that but was wondering if there is something built into Rails that will tell me if its a new record or not.