Skip to content

Instantly share code, notes, and snippets.

Created October 26, 2013 21:44
Show Gist options
  • Save anonymous/7174924 to your computer and use it in GitHub Desktop.
Save anonymous/7174924 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