Permalink
Browse files

Merge pull request #12821 from arunagw/aa-removed-missleading-message

clarified missleading message
  • Loading branch information...
1 parent 86e126d commit 26a2444b1fca66d35b4a32b5f91f9cebb80912c0 @senny senny committed Nov 9, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 activerecord/lib/active_record/core.rb
  2. +1 −1 activerecord/test/cases/invalid_connection_test.rb
@@ -112,7 +112,7 @@ def inspect
elsif abstract_class?
"#{super}(abstract)"
elsif !connected?
- "#{super}(no database connection)"
+ "#{super} (call '#{super}.connection' to establish a connection)"
elsif table_exists?
attr_list = columns.map { |c| "#{c.name}: #{c.type}" } * ', '
"#{super}(#{attr_list})"
@@ -17,6 +17,6 @@ def teardown
end
test "inspect on Model class does not raise" do
- assert_equal "#{Bird.name}(no database connection)", Bird.inspect
+ assert_equal "#{Bird.name} (call '#{Bird.name}.connection' to establish a connection)", Bird.inspect
end
end

0 comments on commit 26a2444

Please sign in to comment.