Skip to content

Instantly share code, notes, and snippets.

@gaboesquivel
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaboesquivel/29250eb034487f9ff0e8 to your computer and use it in GitHub Desktop.
Save gaboesquivel/29250eb034487f9ff0e8 to your computer and use it in GitHub Desktop.
attributes error
# t_array if fetched from and external api
t_array.in_groups_of(15, false) do |group|
group.each do |attributes|
T.find_or_create_by!(a_id: attributes[:a_id]) do |t|
t.name = attributes[:name]
t.other = attributes[:other]
end
end
end
# t.other = attributes[:other] -- > undefined method for a couple of objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment