Switched to a has_many :through, now User can't be blank error

I just changed from a normal has_many :blogs, belongs_to :user
relationship to a has_many through relationship. I created a new
model (subscription) and belongs_to’d it both blog and user, and set
up their has_many :subscriptions and their respective through
association. However, now when I go to create a new blog, I keep
getting a “User can’t be blank” error. In my blog’s create action,
I’m doing:


Is that the problem? Somehow the current_user’s id isn’t matching up
to the user_id column in the subscriptions model? It mapped correctly
before. I thought I might not have to pass in the current user, so I


but I got the same error, “User can’t be blank”.
I then thought maybe I had to allow its attr_accessible for some
strange reason, but still no dice. What am I doing wrong?
Big thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs