A corporation manager and dashboard for EVE Online

admin_controller.rb 439 B

123456789101112131415161718
  1. require 'calefaction/settings'
  2. class AdminController < ApplicationController
  3. def index
  4. end
  5. def update
  6. if params[:settings].is_a? Hash
  7. Calefaction::Settings.update(params[:settings])
  8. flash.now[:notice] = 'Admin settings updated.'
  9. else
  10. # TODO: can we make a better error message for this?
  11. flash.now[:alert] = 'Something is wrong with the settings you submitted.'
  12. end
  13. render 'index'
  14. end
  15. end