def resource_named_route_helper_method?(resource_method, raise_error = false)
      if resource_method.to_s =~ /_(path|url)$/ && resource_method.to_s =~ /(^|^.*_)enclosing_resource(s)?_/
        _, route_method = *route_and_method_from_enclosing_resource_method_and_name_prefix(resource_method, name_prefix)
      elsif resource_method.to_s =~ /_(path|url)$/ && resource_method.to_s =~ /(^|^.*_)resource(s)?_/
        _, route_method = *route_and_method_from_resource_method_and_name_prefix(resource_method, name_prefix)
      else
        return false
      end
      respond_to?(route_method, true) || (raise_error && raise_resource_url_mapping_error(resource_method, route_method))
    end
def resource_named_route_helper_method?(resource_method, raise_error = false)
      if resource_method.to_s =~ /_(path|url)$/ && resource_method.to_s =~ /(^|^.*_)enclosing_resource(s)?_/
        _, route_method = *route_and_method_from_enclosing_resource_method_and_name_prefix(resource_method, name_prefix)
      elsif resource_method.to_s =~ /_(path|url)$/ && resource_method.to_s =~ /(^|^.*_)resource(s)?_/
        _, route_method = *route_and_method_from_resource_method_and_name_prefix(resource_method, name_prefix)
      else
        return false
      end
      respond_to?(route_method, true) || (raise_error && raise_resource_url_mapping_error(resource_method, route_method))
    end
return true if the passed method (e.g. 'resources_path') corresponds to a defined
 named route helper method