I'm new to rails and am learning how to use it.
I came across this problem which i can't figure out what the problem is.
i have 2 classes:
class User < ActiveRecord::Base has_one :blog end
class Blog < ActiveRecord::Base belongs_to :user end
When i try to do User.first.blogs or User.first.blog (not sure which is correct), it tells me that
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: blogs.user_id: SELECT "blogs".* FROM "blogs" WHERE ("blogs".user_id = 1)
I really don't know why there's no such column like that. To my knowledge, i think active record is supposed to handle that for me, right?