5
有誰知道如何解決這個棄用?我已經包含了棄用警告和違規遷移文件。ActiveRecord :: Migrator.proper_table_name已被棄用
DEPRECATION警告:ActiveRecord :: Migrator.proper_table_name已棄用,並將在Rails 4.2中刪除。改爲使用ActiveRecord :: Migration上的proper_table_name實例方法。 (從項目變更名爲/ DB /遷移/ 20141010204446_add_state_to_uploads.rb:4)
# db/migrate/20141010204446_add_state_to_uploads.rb
class AddStateToUploads < ActiveRecord::Migration
def change
add_column :uploads, :state, :string, index: true
add_index :uploads, :state
end
end
引用:
- https://github.com/rails/rails/pull/15512
- http://apidock.com/rails/v4.0.2/ActiveRecord/Migrator/proper_table_name/class