6

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:

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.