diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-07 18:39:42 -0400 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-07 18:39:42 -0400 |
commit | 332f9d1afdcf164b1c1453c727c42dc010f80e5b (patch) | |
tree | a533f562db8dc0c028570d764905fef53763bff2 /activerecord/lib/active_record/connection_handling.rb | |
parent | 017c7f46e0aadffd2e5f02efb5918c0439716a7e (diff) | |
parent | a8258e2bed3ce4f5592f7736607346e4fc47f1a1 (diff) | |
download | rails-332f9d1afdcf164b1c1453c727c42dc010f80e5b.tar.gz rails-332f9d1afdcf164b1c1453c727c42dc010f80e5b.tar.bz2 rails-332f9d1afdcf164b1c1453c727c42dc010f80e5b.zip |
Merge pull request #24897 from maclover7/jm-fix-24844
Followup to #24844
Diffstat (limited to 'activerecord/lib/active_record/connection_handling.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_handling.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index ba763149cc..a628ee4dbd 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -45,7 +45,7 @@ module ActiveRecord # The exceptions AdapterNotSpecified, AdapterNotFound and +ArgumentError+ # may be returned on an error. def establish_connection(spec = nil) - raise RuntimeError, "Anonymous class is not allowed." unless name + raise "Anonymous class is not allowed." unless name spec ||= DEFAULT_ENV.call.to_sym resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new configurations @@ -93,8 +93,7 @@ module ActiveRecord attr_writer :connection_specification_name - # Return the specification id from this class otherwise look it up - # in the parent. + # Return the specification name from the current class or its parent. def connection_specification_name unless defined?(@connection_specification_name) @connection_specification_name = self == Base ? "primary" : superclass.connection_specification_name |