Created
March 17, 2014 12:26
-
-
Save turbod/9598349 to your computer and use it in GitHub Desktop.
Copy carrierwave files to another model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original_solution.files.each do |original_file| | |
f = original_file.dup | |
f.remote_name_url = original_file.name.url | |
new_solution.files << f | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment