Skip to content

Instantly share code, notes, and snippets.

@julianrubisch
Created September 1, 2022 07:44
Show Gist options
  • Save julianrubisch/1c5bc1c48d4a00522b8d74178a553790 to your computer and use it in GitHub Desktop.
Save julianrubisch/1c5bc1c48d4a00522b8d74178a553790 to your computer and use it in GitHub Desktop.
resources :media, shallow: true,
constraints: ->(req) do
current_user = req.env["warden"].user(:user)
Flipper.enabled?(:media_uploads, current_user)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment