Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine table name prefix generator fix #6993

Merged

Conversation

morgoth
Copy link
Member

@morgoth morgoth commented Jul 6, 2012

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:

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

@rafaelfranca
Copy link
Member

cc/ @drogus

josevalim pushed a commit that referenced this pull request Jul 7, 2012
…tor-fix

Engine table name prefix generator fix
@josevalim josevalim merged commit c55df93 into rails:master Jul 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants