Class: RakeDashboard::TasksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rake_dashboard/tasks_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



12
13
14
15
16
# File 'app/controllers/rake_dashboard/tasks_controller.rb', line 12

def create
  @rake_stream = capture(:stdout) { Rake::Task[params[:task]].invoke }

  render inline: "<pre><%= @rake_stream %></pre>"
end

#indexObject



8
9
10
# File 'app/controllers/rake_dashboard/tasks_controller.rb', line 8

def index
  @tasks = RakeDashboard.tasks
end