rubyonrails-talk
August 27th, 2006, 11:09 PM
This seems fairly straight forward, but I'm a newbie to rails. Can I
just write a function and pass it the "comment.body" and have it return
the "comment.body" with all of the
into line feeds?
def break_to_linefeed(text)
text.gsub("
","%0")
text
end
I don't know what the line feed code is, but will something like this
More... (http://groups.google.com/group/rubyonrails-talk/msg/58c6ba56869e6f6e)
just write a function and pass it the "comment.body" and have it return
the "comment.body" with all of the
into line feeds?
def break_to_linefeed(text)
text.gsub("
","%0")
text
end
I don't know what the line feed code is, but will something like this
More... (http://groups.google.com/group/rubyonrails-talk/msg/58c6ba56869e6f6e)