I have a controller posts:
http://www.mydomain.com/posts/123-hello
Please bear in mind that the 123 is unique for each post but is not the correlative id (post.permalink)
I want to access the posts through addresses like:
http://www.mydomain.com/is/123-hello
not
http://www.mydomain.com/posts/123-hello
I have a to_param in my Post model to construct the “123-hello”, but when I use redirect_to @post I end in http://www.mydomain.com/posts/123-hello
How can I do this? Thanks in advance!
For the permalink part, see this question (but it looks like you’ve already got it right):
Rails routing – custom routes for Resources