We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Aleks • 16 years ago

Or you can use the Canonical URL Tag and forget about these annoying redirects

http://www.seomoz.org/blog/...

Henrik N • 16 years ago

I disagree. Using <link rel="canonical"> will fix the indexing part,
telling search engines to index /items/1-foo and nothing else, but if
someone e.g. posts a URL with a fake slug on a forum, someone
following that link will be none the wiser.

mislav • 16 years ago

Neat. We've been doing something similar. The "and return" bit is entirely superfluous, btw

Henrik N • 16 years ago

Cool. And true, "and return" isn't necessary in this particular case. I think I left it in since it will be necessary if the action goes on to render something explicitly, but I suppose that's uncommon for a show action.

return • 16 years ago

personally I enjoy putting returns in everywhere because I think it makes it more obvious what's going on when you're reading back code.

patrickberkeley • 15 years ago

Apparently :overwrite_params was deprecated in 2.3.6 (https://rails.lighthouseapp.... Note the "return" is necessary otherwise you get a double render error when extra stuff is in the URL.

I've posted my code here: http://patrickberkeley.gith....