Should model_name.route_key be a symbol?

Why is Model.model_name.route_key a string? The polymorphic routes requires symbols (you get an error if you pass strings) and this is likely where the route_key would be used the most.

Most of the fields in model_name are strings, but i18n_key is a symbol, so why not route_key ?

1 Like

This was answered here: https://discuss.rubyonrails.org/t/a-post-in-why-is-model-name-route-key-a-string-requires-staff-attention/80449/2?u=akaspick

Thanks