Topic: model through Association

hi, i have 3 table

forum(id,name)
topic(id,forum_id,name)
post(id,forum_id,topic_id,message)

and i have resources

resources :topics do
resources :post
end

in views

new_topic_post_path(params[:topic_id])

how can i get forum_id in the  _form

Re: model through Association

Can you show us what your form looks like at the moment?

Re: model through Association

richlewis14 wrote:

Can you show us what your form looks like at the moment?

yes of course

<%= form_for(@post) do |p| %>
<%=p.hidded_field :topic_id, :value=>params[:topic_id]%>
<%=p.hidded_field :forum_id, :value=>.......????????%>
<%end%>

i have link localhost:3000/topics/2/posts/new

Re: model through Association

any ideas