阅读背景:

Rails:从控制台检查路径助手的输出。

来源:互联网 

Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a given route helper method call. Is it possible to, using the Ruby console, see what link a given helper function will generate? For example, given a named helper like post_path(post) I want to see what URL is generated.Rails defines a bunch of magic with named route




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: