aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2014-11-25 15:08:55 -0700
committerSean Griffin <sean@seantheprogrammer.com>2014-11-25 15:08:55 -0700
commite6089029c4a41f9693cc5f51e6557d6f53b1faf5 (patch)
tree9dac3421aff62c194da6fc6ba07dbdf6d66c9441 /activerecord/lib
parent708e1109d14ed3b2fd68e3cc35f83c8519b9269f (diff)
parent17efb3b919e8eff1ca5da49b12e3c1f607eb93e3 (diff)
downloadrails-e6089029c4a41f9693cc5f51e6557d6f53b1faf5.tar.gz
rails-e6089029c4a41f9693cc5f51e6557d6f53b1faf5.tar.bz2
rails-e6089029c4a41f9693cc5f51e6557d6f53b1faf5.zip
Merge pull request #17697 from sgrif/sg-remove-is-a-check-when-ignoring-tables
Remove is_a? check when ignoring tables
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb7
1 files changed, 1 insertions, 6 deletions
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