Class: AdminController
- Inherits:
-
AdminCartoonistController
- Object
- ActionController::Base
- CartoonistController
- AdminCartoonistController
- AdminController
- Defined in:
- app/controllers/admin_controller.rb
Instance Method Summary collapse
Instance Method Details
#cron ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/admin_controller.rb', line 23 def cron Cartoonist::Cron.all.each &:call render :text => "Success.", :layout => false rescue => e logger.error "Failure running cron: #{e}\n #{e.backtrace.join "\n "}" render :text => "Failure.", :layout => false end |
#main ⇒ Object
19 20 21 |
# File 'app/controllers/admin_controller.rb', line 19 def main render :layout => "general_admin" end |
#reload ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/admin_controller.rb', line 9 def reload if Rails.env.production? %x[git pull] %x[touch #{File.join Rails.root, "tmp/restart.txt"}] flash[:message] = "Updated and restarted." end redirect_to "/admin/main" end |
#show ⇒ Object
5 6 7 |
# File 'app/controllers/admin_controller.rb', line 5 def show redirect_to "/admin/main" end |