12345678910111213141516171819202122 |
- class WebsiteAgentDoesNotUseEventUrl < ActiveRecord::Migration[4.2]
- def up
-
-
-
-
-
- Agents::WebsiteAgent.find_each do |agent|
- next unless agent.sources.count > 0
- if !agent.options['data_from_event'].present? && !agent.options['url_from_event'].present?
- agent.options['url_from_event'] = '{{ url }}'
- agent.save!
- puts ">> Setting `url_from_event` on WebsiteAgent##{agent.id} to {{ url }} because it is wired"
- puts ">> to receive Events, and the WebsiteAgent no longer uses the Event's `url` value directly."
- end
- end
- end
- def down
- end
- end
|