This is because the routing for www.mydomain.com/blogthing/display/666
takes the slug off the end and passes the slug as a parameter to the
"blogthing controller's display action", which then shows the blogthing
entry in question.
/blogthing/display/666 should be accessing the display action, passing
666 as the slug unless you're doing something weird. In which case,
I'd stop doing that weird thing.
I'd presume that your not passing the slug as an id, and your passing
it as a :slug => object.slug or whatever.
Just change that to :id => object.slug(or whatever method it is on the
object) this should automatically populate your URL in the :id space,
as in :controller/:action/:id and then use params[:id] in your
controller....
OR
You could create a named route something like
map.restful_name 'blogthing/display/:slug', :controller =>
controller_name, :action => action_name
Your form should then use, :slug(in place of :id) so :slug =>
object.slug
Then you can use params[:slug] in your controller
Does this make sense?
Basically in both examples the same thing is happening, the :id/:slug
is put into the URL by the form, and then the :id/:slug is pulled out
of the URL by the controller, so if you just go straight to the URL
the controller still finds the id/slug.