简体   繁体   中英

Rails Pages that don't exist resolving

I have a site that has pages like mysite.com/example. However is someone comes in and types mysite.com/example/random_bs than the page actually resolves instead of showing an error. How can I get the page to stop resolving and just show an error?

Rails 2.3.8

Thanks

I think 'map.connect "/:action", :controller => "home"' is your problem. Try

map.connect 'example', :controller => "home", :action => 'example'

or something like that. (Sorry my Rails 2.3 syntax is a little rusty.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM