How to controller test rails 4 engine redirect back to main_app routes

喜你入骨 提交于 2019-12-06 14:57:11
Ben

It looks like there are otherswith similar problems ... I didn't have a chance to try this out myself but take a look at.

stack overflow

def main_app
  Rails.application.class.routes.url_helpers
end

main_app.root_path

just put it directly in you controller test file or in rails helper, just like a separate method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!