those are my routes:
resources :forums, :shallow=>true do
resources :topics, :shallow=>true do
resources :posts
end
end
within topics/show.html.erb I added a form to leave a post (Post is like a comment for a Topic)
<%= form_for [@topic, @post] do |f| %>
<div class="field">
<%= f.label "content" %><br />
<%= f.text_area :content %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
the problem is that the field :topic_id within the model Post stays empty.
shouldn't it get the topic's id automatically?
thanks