File size: 290 Bytes
88211d3
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
defmodule PlausibleWeb.DebugView do
  use PlausibleWeb, :view

  def controller_name(phoenix_controller_name) do
    phoenix_controller_name
    |> String.to_existing_atom()
    |> Module.split()
    |> Enum.drop_while(&String.starts_with?(&1, "Plausible"))
    |> Enum.join(".")
  end
end