aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-04-12 17:54:36 +0100
committerGitHub <noreply@github.com>2017-04-12 17:54:36 +0100
commit2a3b3d21fca7be191955b7627703c83a949e8675 (patch)
tree2b555bff7ae480667bc815f223afd306d8f65411 /activerecord
parent0eb21874cb89dc5ca42945111b4e4ae94106b3e5 (diff)
parent1d05e64b6dc5ba4ed1e21dd2975dcd7faf36795d (diff)
downloadrails-2a3b3d21fca7be191955b7627703c83a949e8675.tar.gz
rails-2a3b3d21fca7be191955b7627703c83a949e8675.tar.bz2
rails-2a3b3d21fca7be191955b7627703c83a949e8675.zip
Merge pull request #28712 from kamipo/tweaks_28678
Tweaks #28678
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index 657bd43b86..94d63765c9 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -47,17 +47,18 @@ module ActiveRecord
@options = options
end
- # turns 20170404131909 into "2017_04_04131909"
+ # turns 20170404131909 into "2017_04_04_131909"
def formatted_version
- return "" unless @version
stringified = @version.to_s
return stringified unless stringified.length == 14
stringified.insert(4, "_").insert(7, "_").insert(10, "_")
end
- def header(stream)
- define_params = @version ? "version: #{formatted_version}" : ""
+ def define_params
+ @version ? "version: #{formatted_version}" : ""
+ end
+ def header(stream)
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