On Monday, March 4, 2013 4:32:10 PM UTC, mike wrote:
> I have a User model which has_many :portfolios and each Portfolio has_many :pictures. My routes look like this:
>
>
>
>
> resources :users do
> resources :portfolios do
> resources :pictures
> end
> end
>
>
> Routing Error
> No route matches {:controller=>"pictures", :user_id=>#<User id: 12, name: "michael", password_digest: "d787f56b080945c1ec0b3343cbf962ca427bb8ef", remember_token: "dL4nPlt0E5azUMemNIvkdg", admin: false, created_at: "2013-03-03 01:18:19", updated_at: "2013-03-03 19:56:28">, :portfolio_id=>#<Portfolio id: nil, user_id: 12, name: nil, created_at: nil, updated_at: nil>}
From this it sounds like somewhere you're trying to link (or generate a form that posts to) the pictures for an unsaved portfolio. This doesn't work because te URL for that would have the portfolio id in it, but the portfolio in question doesn't have an id yet.
Fred