%= f. Dden_field :question_id, :value => params:id % or %= f. Dden_field :question_id, :value => @question.Id % Try this line inside your form, as you said you are in show page of questions, the params:id will be having the id of the question If I misunderstood your question, please let me know.
Params:id %> or @question. Id %> Try this line inside your form, as you said you are in show page of questions, the params:id will be having the id of the question. If I misunderstood your question, please let me know.
Awesome man. Thanks. – bgadoci May 20 '10 at 15:00 You are welcome :).
– Vamsi May 20 '10 at 15:06.
You don't seem have an input for your question_id in your remote_form_for. Is that correct? If so, you need to either pass your current question to your remote_form_for, or explicitly include a hidden field storing your question_id.
For example.
I have an application that allows for users to create questions, create answers to questions, and 'like' answers of others. When a current_user lands on the /views/questions/show.html. Erb page I am trying to display the total 'likes' for all answers on that question, for the current_user.
In my Likes table I am collecting the question_id, site_id and the user_id and I have the appropriate associations set up between user, question, answers and likes. I think I just need to call this information the right way, which I can't seem to figure out. All of the below is taking place in the /views/questions/show.html.
I have tried a couple of other things but they don't make as much sense as the above to me. What am I missing?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.