software_updates_controller.rb 370 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. module Admin
  3. class SoftwareUpdatesController < BaseController
  4. before_action :check_enabled!
  5. def index
  6. authorize :software_update, :index?
  7. @software_updates = SoftwareUpdate.all.sort_by(&:gem_version)
  8. end
  9. private
  10. def check_enabled!
  11. not_found unless SoftwareUpdate.check_enabled?
  12. end
  13. end
  14. end