Ah, related to my other note, you don't really need to use `find_by_slug` here. Given that the id is always the first part of the URL, `ShortenedURL.find(params[:slug]` (or `params[:id]` if you change the route back) will just work, as rails will call `to_i` on it first.