ccc~ 感谢,我一直以为是method_missing的实作,所以是method产生器
刚看了一下应该还是method missing类,只不过是即时generate,就不用二次字串分析
类似这种code
http://apidock.com/rails/ActionDispatch/Routing/RoutesProxy/method_missing
简单的来说初次使用还是method missing,之后产出该名method,
然后因为method missing规则是需要设定到正式的method上而非自干解决掉
就会call到你说的那边去做产生就是
&...另外的 RailsFun.tw 本身就是网址了 Orz"
※ 引述《tonytonyjan (南洋大兜虫)》之铭言:
: 我认为不是 method_missing 的用法
: # actionpack/lib/action_dispatch/routing/route_set.rb:271
: def define_named_route_methods(name, route)
: define_url_helper route, :"#{name}_path", route.defaults, name, PATH
: define_url_helper route, :"#{name}_url", route.defaults, name, FULL
: end
: 还是我误会了你的意思?