Using the correct url_for method in a Rails engine spec

前端 未结 4 1358
自闭症患者
自闭症患者 2020-12-15 21:27

I have a request spec in a Rails engine. The view that is rendered calls a route and passes in a hash, i.e. projects_path(:scope => \"user\"). A route like t

4条回答
  •  庸人自扰
    2020-12-15 21:40

    I had the same issue when updating to Rails 4, and I discovered that the problem was a model containing the following line:

    include Rails.application.routes.url_helpers
    

    Try finding code in your application that includes url_helpers somewhere. Removing that line should help solve the problem.

提交回复
热议问题