Displaying 5 results from an estimated 5 matches for "comment_body".
2006 Jan 22
3
Formatting input/output of a text box
...e line breaks into <br /> tags, or just simply wrap
a whole paragraph in <p></p> tags. I''m currently doing the following in my
comments controller to insert line breaks when the user presses <ENTER>
within the text_area, however I know there has to be a better way.
comment_body = @comment.body
comment_body.gsub!( /(.*)(\n)/, ''\1<br />'' )
@comment.body = comment_body
Thanks!
Dave Hoefler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060122/d5b401ae/attachme...
2006 Nov 23
0
Two repeatable crash bugs in Ferret proper
...ot;! )
--- Second bug: long tokens (?)
#!/usr/bin/ruby
require ''rubygems''
require ''ferret''
# Strangely, the omit_norms is required to exercise the bug.
field_infos = Ferret::Index::FieldInfos.new()
field_infos.add_field( :comment_id )
field_infos.add_field( :comment_body )
index = Ferret::Index::Index.new(
:field_infos => field_infos,
:path =>''./exercisequotebugindex'',
:create => true )
index << { :comment_id => 1, :comment_body => "weird URL, huh? [a href=\"
http://www.hotelbogotaberlin...
2005 Dec 19
7
Error handling!
Hello all,
I''m in the beginning states of learning ruby on rails development and
have got to a part where I''m a little stuck! Basically writing a simple
blog application, just to try something completely different! ;-)
I have a page which displays the current blog entry, it''s comments and
at the bottom of the page, a form to add a comment. So far, so good.
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the
comment to the bottom of the comments list.
How to i return a comment thats is in the comment template and add it to
the bottom of the page. I have gotten as far as rendering some text
back to the form and the comment doesn''t display until i refresh.
This is my _newcomment.rhtml form to create a new comment
<div
2006 Sep 07
6
form_for - Child object - how to set parent id
...pluralize(blog.comments.size,"comments") %></h2>
<% for comment in blog.comments %>
<div class="comment">
<div class="comment_name"><%=h comment.name %> said:</div>
<div class="comment_body"><%=h comment.body %></div>
<div class="comment_date"><%=h
comment.date_entered.to_s(:long) %></div>
</div>
<% end %>
<div class="comment_form" >
<%= error_messages_fo...