0

Another adopted rails app issue. I have the following in my routes.rb file. It is currently not working (not sure if it ever was). We have upgraded from 3.1 -> 3.2.13

scope '/arc' do 
    match '/api/get-images-by-location/:global_id' => 'api#get_images_by_location'
end

and I get the following error:

ActionController::RoutingError (No route matches [GET] "/arc/api/get-images-by-location/168"):

Should this route be working? I think it should but clearly it isn't.

thx for any help

edit 1

Added namespace for arc

timpone
  • 19,235
  • 36
  • 121
  • 211
  • The routing error has a `/arc` in front of `/api`. The rule provided won't catch that I believe. – Mark Meyer May 01 '13 at 20:58
  • The route in the error begins with `/arc/..`. Is that intended? EDIT: @NuclearGhost is correct, the rule won't catch that. – TheDude May 01 '13 at 21:00
  • 1
    sorry, it's namespaced with a scope; edited question. There are about 100 other routes that seem to be working fine – timpone May 01 '13 at 21:00
  • 1
    What does `$ rake routes` say? – Dennis Hackethal May 01 '13 at 21:01
  • `rake routes` has `/api/get-images-by-location/:global_id(.:format) api#get_images_by_location` I've added a , :defaults => {:format => 'json' } at the end. Let me see if that does it. – timpone May 01 '13 at 21:06
  • If you remove the scope part, does your route work if you hit it without the preceding `/arc`? Try and get the route working in a more simple form then add the scope back in. – DaveStephens May 01 '13 at 21:12

0 Answers0