Guest User

Untitled

a guest
Nov 18th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. templates = Templates.all
  2. mapped_things = pairs.map do |pair|
  3. object = templates.find{|t| t.id == pair.second }
  4. object = object.dup
  5. object.thing_id = pair.first
  6. object
  7. end.compact
Add Comment
Please, Sign In to add comment