ActiveRecord :: Migrator.proper_table_name is deprecated

Does anyone know how to eliminate this fatigue? I have included an obsolescence warning and a migration file in violation.

DEPARTURE WARNING: ActiveRecord :: Migrator.proper_table_name is deprecated and will be removed in Rails 4.2. Instead, use the instance_table_name method for ActiveRecord :: Migration. (caused by a change in project / db / migrate / 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 

Cite:

+5
source share
1 answer

Just use ActiveRecord :: Migration.proper_table_name instead when you upgrade to Rails 4.2. Apparently, permission for the Warning message is not available in 4.0 or 4.1.

http://guides.rubyonrails.org/4_2_release_notes.html

+2
source

Source: https://habr.com/ru/post/1205748/


All Articles