From 17efb3b919e8eff1ca5da49b12e3c1f607eb93e3 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 20 Nov 2014 19:17:10 -0700 Subject: Remove is_a? check when ignoring tables Technically changes the API, as it will allow any object which responds to `===`. Personally, I think this is more flexible. --- activerecord/lib/active_record/schema_dumper.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index 261fb9d992..1dd2cadc01 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -244,12 +244,7 @@ HEADER def ignored?(table_name) ['schema_migrations', ignore_tables].flatten.any? do |ignored| - case ignored - when String; remove_prefix_and_suffix(table_name) == ignored - when Regexp; remove_prefix_and_suffix(table_name) =~ ignored - else - raise StandardError, 'ActiveRecord::SchemaDumper.ignore_tables accepts an array of String and / or Regexp values.' - end + ignored === remove_prefix_and_suffix(table_name) end end end -- cgit v1.2.3