Forum: Ruby on Rails problem with globalize3 : undefined method `create_translation_table!'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F8069adedbe2d37460c54eac8102351b?d=identicon&s=25 guirec c. (guirec_c)
on 2012-12-18 02:09
(Received via mailing list)
Hello,

I have the problem posted at this address :
https://github.com/svenfuchs/globalize3/issues/172.

I created a new project with a new model and I integrated globalize3. I
created a migration like this :

     class CreatePages < ActiveRecord::Migration
       def up
         create_table :pages do |t|
           t.timestamps
         end
         Page.create_translation_table! title: :string, body: :body
       end

       def down
         drop_table :pages
         Page.drop_translation_table!
       end
     end

When I migrate I have this error : `undefined method
`create_translation_table!' for Page(Table doesn't exist):Class`.

When I rollback I have this error : `undefined method
`drop_translation_table!' for #<Class:0x00000001eb4640>`.

I don't know what to do. Do you have a solution?

Thanks!
This topic is locked and can not be replied to.