diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-03-31 13:15:17 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2016-03-31 13:15:17 -0600 |
commit | 7b82e1c77b48cb351da4e0ed6ea0bac806d4925c (patch) | |
tree | 26af2c11dd647041d05cecac03f1a7eba71baf21 /activerecord/test/cases | |
parent | 04ac5655be91f49cd4dfe2838df96213502fb274 (diff) | |
download | rails-7b82e1c77b48cb351da4e0ed6ea0bac806d4925c.tar.gz rails-7b82e1c77b48cb351da4e0ed6ea0bac806d4925c.tar.bz2 rails-7b82e1c77b48cb351da4e0ed6ea0bac806d4925c.zip |
Deprecate table names containing dots
Dots have special meaning in most backends (e.g. everything except
SQLite3), as well as most methods that work with table or column names.
This isn't something that we ever explicitly supported, but there's at
least one case of somebody using this (see #24367), so we'll go through a deprecation
cycle as normal.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index eef2d29d02..24746ea56d 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1531,4 +1531,12 @@ class BasicsTest < ActiveRecord::TestCase assert Developer.new.respond_to?(:last_name=) assert Developer.new.respond_to?(:last_name?) end + + test "table names containing a dot are deprecated" do + assert_deprecated do + Class.new(ActiveRecord::Base) do + self.table_name = "foo.bar" + end + end + end end |