неизвестный атрибут: user_id

Я получаю неизвестный атрибут ошибки: user_id во время выполнения current_user.stories.build

class User < ActiveRecord::Base
  has_many :stories, class_name: 'Story', foreign_key: 'user_id', dependent: :destroy
  ...

class Story < ActiveRecord::Base
  belongs_to :user, class_name: 'User', foreign_key: 'user_id'
  ...

schema.rb

create_table "stories", :force => true do |t|
    t.string   "responsible"
    t.string   "descr"
    t.string   "state"
    t.datetime "created_at",  :null => false
    t.datetime "updated_at",  :null => false
  end

  create_table "users", :force => true do |t|
    t.string   "email"
    t.string   "password_digest"
    t.datetime "created_at",      :null => false
    t.datetime "updated_at",      :null => false
    t.string   "name"
  end

Он не содержит "user_id" поле. Есть идеи?

Ответы на вопрос(3)

Ваш ответ на вопрос