Created
January 24, 2020 03:00
-
-
Save RNDcpp/643d24cd4c470e946dcae606daa4f566 to your computer and use it in GitHub Desktop.
This file contains 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
ids = [1,2,3] | |
#=> [1, 2, 3] | |
#書き込み | |
recommendation = Recommendation.create(uid: 1, recommended_id_list: ids.pack('Q<*')) | |
#=> #<Recommendation uid: 1, recommended_id_list: "\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00", updated_at: "2020-01-15 09:56:20"> | |
#読み込み | |
recommendation.recommended_id_list.unpack('Q<*') | |
#=> [1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment