hey there - I want to use avo route helpers in ...
# avo-2
m
Thread automatically created by gee_forr in #740893011994738751
l
Hello, have you tried
Avo::Engine.routes.url_helpers
?
l
meaning,
include Avo::Engine.routes.url_helpers
f
hey there - no - I didn't 🙂 I couldnt find it anywhere in the v2 docs. Imma use it now - thank you!
l
We’ll add that.
Where did you try to use the link helpers and they failed?
f
I got it working with yours and @loud-jewelry-99127 's suggestion. I was kicking off a slack notification in a model
l
so in a controller?
f
no - in a model... we have a critical model that we need to be notified on whenever a new record is created via an automated process.
so - against my better judgement, we added an
after_create
callback to kick off a notification in the model.
and the notification includes a link to the record's page on avo
there were no controllers involved
f
well... pretty cool, except for the callback part. that was icky
l
callbacks can get complex but for this scenario it sounds good