Permalink
Browse files

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

clarified missleading message
  • Loading branch information...
2 parents 849400c + 539ce8b commit 951348aec5dc5ec7443b8113ec7af4db5cde024c @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
@@ -109,7 +109,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 951348a

Please sign in to comment.