Class: PollingController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PollingController
- Defined in:
- app/controllers/polling_controller.rb
Instance Method Summary collapse
Instance Method Details
#alerts ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/polling_controller.rb', line 2 def alerts alerts = [] %w{ installing uninstalling }.each do |action| send("#{action}_gems").each do |plugin| target = plugin.gem_name.dup target << "(#{plugin.version})" if plugin.version alerts << { text: I18n.t("terms.#{action}", target: target) } end end render json: alerts end |