Skip to content

Instantly share code, notes, and snippets.

@JeanMertz
Created April 19, 2011 13:47
Show Gist options
  • Save JeanMertz/927807 to your computer and use it in GitHub Desktop.
Save JeanMertz/927807 to your computer and use it in GitHub Desktop.
theme = Factory.build(:theme)
temp_file = Tempfile.new('prefix', "#{Rails.root}/tmp")
temp_file << theme.html
temp_file.flush
theme.html = temp_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment