Reputation: 3794
I am using this, Saving-User-last-login-Time-in-Grails, simple tutorial to add lastLoginTime
to User
. So, everytime a user
logs in, the last signed in date/time is saved to database. I followed the steps, provided in the tutorial, exactly. But end-up getting this error.
No signature of method: groovy.util.ConfigObject.withTransaction() is applicable for argument types: (Config$_run_closure3_closure11) values: [Config$_run_closure3_closure11@12fab25]
Looks like the Gorm code, in Config.groovy
file, is not respected. Does anyone know, where else should I move the code to solve this problem?
Any help is much appreciated. Thanks.
Upvotes: 0
Views: 43
Reputation: 39907
Try application.groovy
, instead. For details, refer registeringCallbackClosures.
For more insight, and other approaches to achieve similar behaviour, see Events.
Upvotes: 1