houdini/lib/update/update_activities.rb

14 lines
469 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2020-06-12 20:03:43 +00:00
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
require 'qx'
module UpdateActivities
def self.for_supporter_notes(supporter_note)
user_email = supporter_note.user.email
supporter_note.activities.update_all(json_data: { content: supporter_note.content, user_email: user_email }.to_json,
updated_at: DateTime.now)
end
end