Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个控制器,想获得它的公共方法,但对这个结果感到困惑;应该有大约十种方法:
IndexController.public_methods - ApplicationController.public_methods # => []
这不是打电话给我认为应该打电话的吗?
对于特定的控制器,您可以使用action_methods
action_methods
ApplicationController.action_methods
如何在 ruby on rails 中获取控制器和操作列表?