Skip to content

Rake task fails when you set config.action_controller.asset_host #6

Closed
@ProGM

Description

@ProGM

When you set asset_host in your configs the rake task fails:

config.action_controller.asset_host = 'http://www.some.host.com'
$ rake critical_path_css:generate
Unable to open file '/myapp/publichttp://www.some.host.com/assets/application-d27ba3f146352a973ffa7b384336c02eeba72a60aa8ceeac1d9155987c778b5c.css'

I think it could be easily fixed by changing this line:
https://github.com/mudbugmedia/critical-path-css-rails/blob/master/lib/critical_path_css/configuration.rb#L35

with this:

@manifest_path ||= ActionController::Base.helpers.stylesheet_path(manifest_name, host: '')

If you want, I can create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions