Class: TuneupController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/tuneup_controller.rb

Instance Method Summary collapse

Instance Method Details

#assetObject



15
16
17
18
19
20
21
# File 'lib/tuneup_controller.rb', line 15

def asset
  filename = File.basename(params[:file])
  if filename =~ /css$/
    response.content_type = 'text/css'
  end
  send_file File.join(File.dirname(__FILE__) << "/../assets/#{filename}")
end

#offObject



27
28
29
# File 'lib/tuneup_controller.rb', line 27

def off
  collect false
end

#onObject



23
24
25
# File 'lib/tuneup_controller.rb', line 23

def on
  collect true
end

#sandboxObject



31
32
33
# File 'lib/tuneup_controller.rb', line 31

def sandbox
  
end

#showObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/tuneup_controller.rb', line 3

def show
  session['fiveruns_tuneup_last_uri'] = params[:uri]
  debug_rjs = response.template.debug_rjs
  response.template.debug_rjs = false
  ActionController::Base.silence do
    render :update do |page|
      page << tuneup_reload_panel
    end
  end
  response.template.debug_rjs = debug_rjs
end