diff options
author | yui-knk <spiketeika@gmail.com> | 2016-01-30 17:47:01 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2016-01-30 17:47:01 +0900 |
commit | 8b9d217d0846752372791b7b8f34a0aa2e2ab812 (patch) | |
tree | a9420209068dac57f9f6b1cf201a71ad4a31aec1 /activerecord/lib | |
parent | 6162c49e40582bf058a6bb82ccc0cfb8f92332b6 (diff) | |
download | rails-8b9d217d0846752372791b7b8f34a0aa2e2ab812.tar.gz rails-8b9d217d0846752372791b7b8f34a0aa2e2ab812.tar.bz2 rails-8b9d217d0846752372791b7b8f34a0aa2e2ab812.zip |
Explicitly define `columns` method as an interface
`ActiveRecord::ConnectionAdapters::SchemaStatements#columns` is defined
here as an interface method here. So changes to raise `NotImplementedError`
same as `tables`, `views` ...etc.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index c7aff63228..efa427fa88 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -92,7 +92,9 @@ module ActiveRecord # Returns an array of Column objects for the table specified by +table_name+. # See the concrete implementation for details on the expected parameter values. - def columns(table_name) end + def columns(table_name) + raise NotImplementedError, "#columns is not implemented" + end # Checks to see if a column exists in a given table. # |