I’m not sure if Rails has this – in other frameworks, it’s called
“direct action” – the idea being that a URL request triggers some code
to run, but doesn’t result in a web-page being displayed.
So, for example, I might have a cron job that does:
wget myApp.domain.com/email_stats
which triggers a notifier to send me email with some database
statistics, but I don’t want it to bother downloading a page.
I could do
wget myApp.domain.com/email_stats > /dev/null
but that strikes me as cleaning up the mess after I make it, rather than
not making the mess in the first place. So what I’m looking for is some
sort of
render => nil
or whatever that I can put at the end of my action to make it not render
a page.
Is that possible?
Thanks!