Skip to content
  • John Hawthorn's avatar
    dd9991ba
    Deprecate rendering templates with . in the name · dd9991ba
    John Hawthorn authored
    Allowing templates with "." introduces some ambiguity. Is index.html.erb
    a template named "index" with format "html", or is it a template named
    "index.html" without a format? We know it's probably the former, but if
    we asked ActionView to render "index.html" we would currently get some
    combination of the two: a Template with index.html as the name and
    virtual path, but with html as the format.
    
    This deprecates having "." anywhere in the template's name, we should
    reserve this character for specifying formats. I think in 99% of cases
    this will be people specifying `index.html` instead of simply `index`.
    
    This was actually once deprecated in the 3.x series (removed in
    6c57177f) but I don't think we can rely
    on nobody having introduced this in the past 8 years.
    dd9991ba
    Deprecate rendering templates with . in the name
    John Hawthorn authored
    Allowing templates with "." introduces some ambiguity. Is index.html.erb
    a template named "index" with format "html", or is it a template named
    "index.html" without a format? We know it's probably the former, but if
    we asked ActionView to render "index.html" we would currently get some
    combination of the two: a Template with index.html as the name and
    virtual path, but with html as the format.
    
    This deprecates having "." anywhere in the template's name, we should
    reserve this character for specifying formats. I think in 99% of cases
    this will be people specifying `index.html` instead of simply `index`.
    
    This was actually once deprecated in the 3.x series (removed in
    6c57177f) but I don't think we can rely
    on nobody having introduced this in the past 8 years.
Loading