Skip to content

Use ActiveStorage::SetCurrent to simplify Admin:ProjectsController #545

@floehopper

Description

@floehopper

I noticed that there's a before action in Admin::ProjectsController that sets ActiveStorage::Current.url_options:

def set_host_for_local_storage
return unless Rails.application.config.active_storage.service == :local
ActiveStorage::Current.url_options = { host: request.base_url }
end

I think we might be able to include ActiveStorage::SetCurrent into the controller instead:

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