1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 16:46:42 +01:00
projekteuler/app/controllers/admin/dashboard_controller.rb

12 lines
339 B
Ruby

class Admin::DashboardController < AdminController
def index
@current_problem_count = Problem.count
@most_recent_pull = Problem.maximum(:pulled_at)
end
def pull_problems
PullProblemsJob.perform_later
redirect_to({:controller => 'admin/dashboard', :action => :index}, notice: t('.pull_problems_initiated'))
end
end