Class: Profiler::AssetsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/profiler/assets_controller.rb

Instance Method Summary collapse

Instance Method Details

#main_cssObject



22
23
24
25
26
27
# File 'app/controllers/profiler/assets_controller.rb', line 22

def main_css
  path = Profiler::Engine.root.join("app", "assets", "builds", "profiler.css")
  css = File.read(path)
  expires_in 1.hour, public: true
  render plain: css, content_type: "text/css"
end

#main_jsObject



15
16
17
18
19
20
# File 'app/controllers/profiler/assets_controller.rb', line 15

def main_js
  path = Profiler::Engine.root.join("app", "assets", "builds", "profiler.js")
  js = File.read(path)
  expires_in 1.hour, public: true
  render plain: js, content_type: "application/javascript"
end

#toolbar_jsObject



8
9
10
11
12
13
# File 'app/controllers/profiler/assets_controller.rb', line 8

def toolbar_js
  path = Profiler::Engine.root.join("app", "assets", "builds", "profiler-toolbar.js")
  js = File.read(path)
  expires_in 1.hour, public: true
  render plain: js, content_type: "application/javascript"
end