On 2 Aug 2008, at 00:06, Justin To wrote:
>
> <% for post in @posts %>
>
> <%= link_to_remote "Edit", :url => { :controller =>
> "threads", :action
> => :new_req }, :with =>
"''description=#{post.description}''"
>
> <% end %>
>
You don''t need to use :with for this. But apart from that, the problem
is that you''re not escaping the description. The post I linked you to
the other day about the usage of the :with parameter covered both of
these things.
Fred> When I make a post with the form and enter a description like such:
>
> Description text_area:
> this is a description
> that has linebreaks,
> or... at least,
> I have pressed enter
> several times.
>
> It can save fine when made with the form. But in my first code, when I
> try to set params[:description] = post.description, it doesn''t
work
> properly. Not sure why. It only happens when I make a description and
> hit enter one or more times (have linebreaks)...
>
> Any help is much appreciated!
>
> Thanks
> --
> 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---