diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-29 12:23:37 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:24 -0700 |
commit | 17a66a8ddc5a2ee8263d1dcc86a032322cb8e615 (patch) | |
tree | 693acfb9432b142bca528c537c1bbda18bdf3755 /activerecord/lib/active_record | |
parent | 55fb1780a0695bc60ba7ab91084026d45c36b43e (diff) | |
download | rails-17a66a8ddc5a2ee8263d1dcc86a032322cb8e615.tar.gz rails-17a66a8ddc5a2ee8263d1dcc86a032322cb8e615.tar.bz2 rails-17a66a8ddc5a2ee8263d1dcc86a032322cb8e615.zip |
dump IO encoding value along with schema.rb so the file can be reloaded. fixes #1592
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index 19585f6214..6fe305f843 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -40,6 +40,10 @@ module ActiveRecord def header(stream) define_params = @version ? ":version => #{@version}" : "" + if stream.respond_to?(:external_encoding) + stream.puts "# encoding: #{stream.external_encoding.name}" + end + stream.puts <<HEADER # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to |