Rails url_for and namespaced models

前端 未结 4 1434
迷失自我
迷失自我 2020-12-29 08:13

In Rails, is it possible to namespace models in modules and still get correct behavior from url_for?

For instance, here, url_for works as e

4条回答
  •  悲&欢浪女
    2020-12-29 08:24

    Use

    namespace "blah" do
      resources :thing
    end
    

    Then routes will be named appropiately.

    rake routes
    

    To view all routes

提交回复
热议问题