我已经升级到Rails 4.0.5,我使用的是Jammit 0.6.6。在启动服务器时,我会得到一个错误:
/home/haimh/.rvm/gems/ruby-2.1.0/gems/actionpack-4.0.5/lib/action dispatch/routing/mapper.rb:191:in normalize_condition!:You should not use the match method in your router without specifying an HTTP method.查看堆栈跟踪,我看到Jammit的routes.rb文件正在使用旧的路由API。
除了手动更新Jammit的routes.rb文件中的代码之外,还有任何解决这个问题的方法吗?
发布于 2014-05-26 11:12:13
使用via
就像这样:
将, via => [:get, :post]添加到末尾
match ':controller(/:action(/:id))' , :controller=> /admin\/[^\/]+/, :via => [:get,:post]如果您不想使用“匹配”,则必须在
resources :controller do
get :action, :on => :collection
endhttps://stackoverflow.com/questions/23868779
复制相似问题