def app_routes_as_hash
      Rails.application.routes.routes.each do |route|
        controller = route.defaults[:controller]

        next if controller.nil?

        key = controller.split('/').map(&:camelize).join('::')
        routes[key] ||= []
        routes[key] << route.defaults[:action]
      end
    end
def app_routes_as_hash
      Rails.application.routes.routes.each do |route|
        controller = route.defaults[:controller]

        next if controller.nil?

        key = controller.split('/').map(&:camelize).join('::')
        routes[key] ||= []
        routes[key] << route.defaults[:action]
      end
    end
Routes from routes.rb