Sha256: c6de75ee99751fa4fdf113793804abf848fc86ab80e4bde528e5f02cecffd79e

Contents?: true

Size: 408 Bytes

Versions: 4

Compression:

Stored size: 408 Bytes

Contents

module RailsDevtools
  module Frontend
    class ModulesController < ApplicationController
      protect_from_forgery except: :show

      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
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_devtools-0.1.3 app/controllers/rails_devtools/frontend/modules_controller.rb
rails_devtools-0.1.2 app/controllers/rails_devtools/frontend/modules_controller.rb
rails_devtools-0.1.1 app/controllers/rails_devtools/frontend/modules_controller.rb
rails_devtools-0.1.0 app/controllers/rails_devtools/frontend/modules_controller.rb