Skip to content

Instantly share code, notes, and snippets.

@masui masui/register.rb
Created Aug 25, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.