Skip to content

Instantly share code, notes, and snippets.

@NeMO84
Created January 7, 2011 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeMO84/770302 to your computer and use it in GitHub Desktop.
Save NeMO84/770302 to your computer and use it in GitHub Desktop.
the issue seems to be if I put :ids => /\d/ or :constraints=>{:ids => /\d/} then I get a RuntimeError (route set not finalized):
Started POST "/login.xml" for 127.0.0.1 at 2011-01-07 15:17:10 -0800
RuntimeError (route set not finalized):
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.7ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.6ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (12.2ms)
Api2::Application.routes.draw do
match 'test/:action', :to => "test#:action"
match 'search/:action/(*expand)', :to => "search#:action", :via => "get"
match 'uploads', :to => "uploads#fast_upload", :via => "post"
match 'login', :to => "login#sign_in", :via => "post"
match 'login', :to => "login#read", :via => "get"
match 'login', :to => "login#sign_out", :via => "delete"
match 'signups/authenticate', :to => "signups#authenticate", :via => "get"
match 'signups/validate', :to => "signups#validate", :via => "get"
match ':controller', :to => ":controller#create", :via => "post"
match ':controller', :to => ":controller#read", :via => "get"
match ':controller/:ids/(*expand)', :to => ":controller#read", :via => "get", :ids => /^\d/
match ':controller/:ids', :to => ":controller#update", :via => "put"
match ':controller/:ids', :to => ":controller#destroy", :via => "delete"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment