On 28 February 2010 13:14, Manish Belsare <li...@ruby-forum.com> wrote:
> Sir basically i want the idd from  the link_to part i.e wen i click the
> "Answer this query!" link then the browser will redirect to:
> http://0.0.0.0:3000/answers/new?idd=9

The code you posted, that you have now snipped should do exactly that.
 As I suggested previously have a look in development.log and see what
parameters are posted.  In fact first look at the html of the page
(View, Page source or similar in browser) and see what url has been
generated for the link.

Colin

>
> now i want the idd = 9 to be assinged to the @post
> or even a query like @post = Post.find(params[:id]) will do..
> bt i dont know how to get that id in answer controller..
>
> i want the id which is 9 to be available in answer_controller...
> How 2 achieve this?
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to