Skip to content

Commit

Permalink
Avoid using index_with to retain support for rails 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar committed Dec 16, 2022
1 parent da900c6 commit 0a76b34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/active_fedora/attached_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ def serialize_attached_files

# Returns only the attached_files that are declared with 'contains'
def declared_attached_files
attached_files.reflections.keys.index_with do |k|
attached_files[k]
result = {}
attached_files.reflections.keys.each do |k|
result[k] = attached_files[k]
end
result
end

#
Expand Down

0 comments on commit 0a76b34

Please sign in to comment.