方法
类公共方法
new(route) 链接
源代码: 显示 | 在 GitHub 上查看
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 13 def initialize(route) requirements = route.requirements @controller_name = requirements[:controller] @action_name = requirements[:action] @controller_class = (@controller_name.to_s.camelize + "Controller").safe_constantize end
实例公共方法
unused?() 链接
源代码: 显示 | 在 GitHub 上查看
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 20 def unused? controller_class_missing? || (action_missing? && template_missing?) end