I am working on a microblogging application.(similar to twitter)
In my controller there is a method called replypopUp.It is a method
that runs when the reply link on timeline is clicked.When I a click on
the link a pop-up appears in which there is a text area and a post
button.Inside the text area,the name of the user to whom I am replying
should appear in the form ‘@username:’
Now in my controller method I am taking that user’s name using
@posted_by_name = params[:posted_by]
In my view my text area looks like this
<textarea name=“message” id=“message” maxlength =“400”
%=h @posted_by_name %>:
The text within <% %> is the username I am trying to paste by default
inside the text area
However when I run the application,I only get" @:" in the text
area.The name of the user does not appear.
I have also tried to check using http watch,and I see the url being
passed correctly,so there is no chance of params[:posted_by] being
taken as a null value.
Kindly let me know if my way of displaying the valaue is incorrect.If
yes how should I display it in my view?
Thanks in Advance