Class: RailsDevtools::Frontend::ModulesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails_devtools/frontend/modules_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/rails_devtools/frontend/modules_controller.rb', line 6

def show
  file = RailsDevtools.importmap.find(params[:path]).file_path
  return head :not_found unless file

  send_file(
    file,
    type: "application/javascript",
    disposition: "inline"
  )
end