So, I can't just pass it my permalink value (which is worked out using
to_param)? I have to create a whole method using regex that returns
something that is exactly the same?
Why am I starting to feel I'm talking to the wall?
You have URLs, .e.g.
You need a method to extract the unique ID from each of those and
return the permalink value. You don't *have* to use a regex, it's just
a common approach. Write it any way you want. But that is the first
step to solving your problem. Unless you just manually create every
rewrite rule, of course.
I would GREATLY appreciate it if you could just give a reply like "If
I had a blog with the same kind of setup, what I could do is write a
redirect like this, as you can get the permalink value by doing this."
That *would* be an awesome trick, considering that I don't have any
idea where *your* permalink values are coming from. You could be
storing them in the DB, generating them on the fly, scooping them out
of Schrödinger's cat's litter box -- who knows?
Wait -- *you* know, so *you* can write that code.
Though as Marnen previously suggested, many of us *are* available
for contract work