Skip to content

Commit

Permalink
fixed close_agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
machisuji committed Jun 7, 2019
1 parent 80a07b7 commit d5abe0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/meeting/app/models/meeting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def close_agenda_and_copy_to_minutes!
minutes = create_minutes(text: original_text, comment: 'Minutes created', attachments: attachments.map(&:last))

# substitute attachment references in text to use the respective copied attachments
updated_text = text.gsub(/(?<=\(\/api\/v3\/attachments\/)\d+(?=\/content\))/) do |id|
updated_text = original_text.gsub(/(?<=\(\/api\/v3\/attachments\/)\d+(?=\/content\))/) do |id|
old_id = id.to_i
new_id = attachments.select { |a, _| a.id == old_id }.map { |_, a| a.id }.first

Expand Down

0 comments on commit d5abe0a

Please sign in to comment.