Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing enconding troubles with migrations

  • Loading branch information...
commit 4b286ff03c424ed675b1774f7ab63f8d209ed2e0 1 parent aaf7d81
@ifunam-mirror ifunam-mirror authored
View
2  db/migrate/20101211021308_extract_files_from_user_document_to_file_system.rb
@@ -24,7 +24,7 @@ def self.up
puts "Creating file: #{filename}"
@user_document = UserDocument.find(record.id)
File.open(filename, 'w') do |f|
- f.write @user_document.file
+ f.write @user_document.file.force_encoding('utf-8')
end
end
puts "Inserting document: :user_id => #{record.user_id}, :file => #{filename}"
View
1  db/migrate/20110127162444_insert_refereed_criteria.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
class InsertRefereedCriteria < ActiveRecord::Migration
def self.up
['Artículo', 'Carta', 'Nota de investigación', 'Otro'].each do |name|
Please sign in to comment.
Something went wrong with that request. Please try again.