class ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder

def self.build(action, type)

def self.build(action, type)
  prefix = action ? "#{action}_" : ""
  suffix = type
  if action.to_s == "new"
    HelperMethodBuilder.singular prefix, suffix
  else
    HelperMethodBuilder.plural prefix, suffix
  end
end