Does anyone know how to resolve this deprecation? I have included the deprecation warning and the offending migration file.
DEPRECATION WARNING: ActiveRecord::Migrator.proper_table_name is deprecated and will be removed in Rails 4.2. Use the proper_table_name instance method on ActiveRecord::Migration instead. (called from change at 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:
Simply use ActiveRecord::Migration.proper_table_name instead when you upgrade to Rails 4.2. Apparently a resolution for the Warning message is not available in 4.0 or 4.1.
http://guides.rubyonrails.org/4_2_release_notes.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With