aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/model_schema.rb
diff options
context:
space:
mode:
authorJerad Phelps <jerad.phelps@gmail.com>2013-10-17 19:00:22 -0500
committerJerad Phelps <jerad.phelps@gmail.com>2013-10-27 08:50:35 -0500
commit26638f0ac939edb00d12b55442bbdb138d5d9449 (patch)
treedb4342624b74367631e79a0a2a83212aff9b6747 /activerecord/lib/active_record/model_schema.rb
parent6c2810b8ed692004dca43e554982cdfdb8517b80 (diff)
downloadrails-26638f0ac939edb00d12b55442bbdb138d5d9449.tar.gz
rails-26638f0ac939edb00d12b55442bbdb138d5d9449.tar.bz2
rails-26638f0ac939edb00d12b55442bbdb138d5d9449.zip
added schema_migrations_table_name to ActiveRecord::Base in order that the name of the schema migrations table can be configured.
consolidated test_schema_migrations_table_name tests Added changelog entry edited changelog removed commented lines removed reader ensure the schema migrations table is reset at end of test added entry to configuration guide guides typo and changelog order
Diffstat (limited to 'activerecord/lib/active_record/model_schema.rb')
-rw-r--r--activerecord/lib/active_record/model_schema.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb
index 75c0c1bda8..dc5ff02882 100644
--- a/activerecord/lib/active_record/model_schema.rb
+++ b/activerecord/lib/active_record/model_schema.rb
@@ -34,6 +34,12 @@ module ActiveRecord
##
# :singleton-method:
+ # Accessor for the name of the schema migrations table. By default, the value is "schema_migrations"
+ class_attribute :schema_migrations_table_name, instance_accessor: false
+ self.schema_migrations_table_name = "schema_migrations"
+
+ ##
+ # :singleton-method:
# Indicates whether table names should be the pluralized versions of the corresponding class names.
# If true, the default table name for a Product class will be +products+. If false, it would just be +product+.
# See table_name for the full rules on table/class naming. This is true, by default.