Last active
November 16, 2017 03:47
-
-
Save bholzer/2b62a9e8aac797d2a0b578231e9105d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
templates = Templates.all | |
mapped_things = pairs.map do |pair| | |
object = templates.find{|t| t.id == pair.second } | |
object = object.dup | |
object.thing_id = pair.first | |
object | |
end.compact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment