use of_type

This commit is contained in:
Albert Sun 2017-08-01 08:37:59 -04:00
parent 34b56885c8
commit 9a17bc68b9

View file

@ -72,7 +72,7 @@ class ApplicationController < ActionController::Base
end
def outdated_google_auth_check
@outdated_google_cal_agents = current_user.agents.where("type like 'Agents::GoogleCalendarPublishAgent'").select do |agent|
@outdated_google_cal_agents = current_user.agents.of_type('Agents::GoogleCalendarPublishAgent').select do |agent|
agent.options['google']['key_secret'].present?
end
end