• blackst0ne's avatar
    [Rails5] Set request.format in commits_controller · 6da19415
    blackst0ne authored
    Since Rails 5.0 `request.format` is being set depending on the route extension.
    
    In commits pages we pass a ref as a URL parameter.
    If the ref is an extension-like, Rails converts it and sets to
    `request.format`.
    
    E.g. if the ref is `some_branch.atom`, Rails starts responding with
    `atom` format, but it should response with `html` because `.atom` is the
    part of ref name, not the format.
    
    This commit explicitly sets `request.format` to `:html` when needed.
    6da19415
blackst0ne-rails5-set-request-format-in--commits-controller.yml 118 Bytes