From 8b9d217d0846752372791b7b8f34a0aa2e2ab812 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 30 Jan 2016 17:47:01 +0900 Subject: 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. --- .../active_record/connection_adapters/abstract/schema_statements.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters') 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. # -- cgit v1.2.3