This code works
version 'v1', using: :path, vendor: 'api'
resource :test do
desc "Returns pong."
get "ping" do
{ ping: "pong" }
end
end
This code doesn't work but it can work on 0.15.0
version %w(v2 v1), using: :path, vendor: 'api'
resource :test do
desc "Returns pong."
get "ping" do
{ ping: "pong" }
end
end
Started GET "/api/v1/test/ping" for ::1 at 2016-05-16 18:50:34 +0700
ActionController::RoutingError (No route matches [GET] "/api/v1/test/ping"):
actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:incall' web-console (2.2.1) lib/web_console/middleware.rb:39:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.0) lib/rails/rack/logger.rb:38:incall_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:inblock in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:intagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:incall' quiet_assets (1.1.0) lib/quiet_assets.rb:27:incall_with_quiet_assets'
request_store (1.2.0) lib/request_store/middleware.rb:8:incall' actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:incall'
rack (1.6.4) lib/rack/methodoverride.rb:22:incall' rack (1.6.4) lib/rack/runtime.rb:18:incall'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' rack (1.6.4) lib/rack/lock.rb:17:incall'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:incall' rack (1.6.4) lib/rack/sendfile.rb:113:incall'
sentry-raven (0.15.2) lib/raven/integrations/rack.rb:54:incall' railties (4.2.0) lib/rails/engine.rb:518:incall'
railties (4.2.0) lib/rails/application.rb:164:incall' rack (1.6.4) lib/rack/lock.rb:17:incall'
rack (1.6.4) lib/rack/content_length.rb:15:incall' rack (1.6.4) lib/rack/handler/webrick.rb:88:inservice'
How can I solve this problem temporarily before some developers fix it?
Did this work before? I'd write a spec for it to start.
I upgraded from 0.15.0 to 0.16.2 and it didn't work anymore. Yes. It had worked quite well on 0.15.0.
I'm not sure but I think "#1276: Replace rack-mount with new router " caused the problem.
me too, version array does not work on 0.16.2
Can someone please start by writing and PRing a spec for this? And do try to fix it. If you get stuck we'll help out.
Most helpful comment
Can someone please start by writing and PRing a spec for this? And do try to fix it. If you get stuck we'll help out.