Skip to content

Instantly share code, notes, and snippets.

@zishe
Forked from anonymous/gist:7174924
Created October 26, 2013 22:13
Show Gist options
  • Save zishe/7175205 to your computer and use it in GitHub Desktop.
Save zishe/7175205 to your computer and use it in GitHub Desktop.
SourceFileInfo.find_or_create_by(hash: hash) do |sfi|
sfi.name = file_id
sfi.ext = ext
sfi.path = file_path
sfi.original_name = original_name
sfi.user = user
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment