uninitialized constant in blah/blah/add_feed_id_to_entry_states.rb:6:in `up'
class AddFeedIdToEntryStates < ActiveRecord::Migration
def up
add_column :entry_states, :feed_id, :integer
add_index :entry_states, :feed_id
EntryState.find_each do |entry_state|
entry_state.feed_id = entry_state.entry.feed_id
entry_state.save!
end
end
def down
remove_column :entry_states, :feed_id
end
end
任何人都可以看到第 6 行有什么问题吗?“EntryState.find_each”使用 ruby 2.0