Class: Rack::Bug::SQLPanel::PanelApp
- Defined in:
- lib/rack/bug/panels/sql_panel/panel_app.rb
Instance Attribute Summary
Attributes inherited from PanelApp
Instance Method Summary collapse
Methods inherited from PanelApp
#call, #not_found, #params, #render_template, #validate_params
Methods included from Render
#compile, #compile!, #compiled_source, #method_name, #method_name_without_locals, #render_template, #signed_params
Instance Method Details
#dispatch ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rack/bug/panels/sql_panel/panel_app.rb', line 7 def dispatch case request.path_info when "/__rack_bug__/explain_sql" then explain_sql when "/__rack_bug__/profile_sql" then profile_sql when "/__rack_bug__/execute_sql" then execute_sql else not_found end end |
#execute_sql ⇒ Object
28 29 30 31 32 |
# File 'lib/rack/bug/panels/sql_panel/panel_app.rb', line 28 def execute_sql validate_params query = Query.new(params["query"], params["time"].to_f) render_template "panels/execute_sql", :result => query.execute, :query => query.sql, :time => query.time end |