Skip to content

Instantly share code, notes, and snippets.

@masui
Created August 25, 2015 12:00
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 masui/2fc4348b81e75c801703 to your computer and use it in GitHub Desktop.
Save masui/2fc4348b81e75c801703 to your computer and use it in GitHub Desktop.
Gyazo1
id = ARGV[0]
time = ARGV[1]
url = ARGV[2]
exit unless id && time && url
time = time.gsub(/_/,' ')
d = Image.find_by(image_id: id)
d.date = Time.zone.parse(time).utc
d.metadata = { 'url' => url }
d.update
p d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment