rails/rails — pull request #6993 by morgoth (2012-07-06 19:35:17+00:00)
Title: Engine table name prefix generator fix

When generating namespaced model inside mountable engine, table_name_prefix was not including engine name:

```
cd my_engine
rails g model namespaced/user
```
File: my_engine/app/models/namespaced.rb:

```ruby
module MyEngine
module Namespaced
def self.table_name_prefix
'namespaced_'
end
end
end
```

Table name prefix should include engine name: `my_engine_namespaced_`

I added failing test and fix.
I noticed that one test failed after this change, which I believe was wrong assumption.
I also fixed this test according to current changes