similar to: ruby's simple_format method is not working for spaces.

Displaying 20 results from an estimated 12000 matches similar to: "ruby's simple_format method is not working for spaces."

2009 Feb 24
2
Displaying line breaks & paragraphs using 'simple_format' ?
Hi there, I need to: 1. STORE a text of the below format in a (MySQL) database (using a ''textarea''), and then 2. RETRIEVE & DISPLAY it in exactly the same format (meaning: keeping all paragraphs/line breaks). The intended text format looks like this: *** Blah blahblah blah blah blahblah blah blah blahblah blah blah blahblah blah, blah blahblah. <- NEW
2006 Jan 04
2
simple_format and in_place_editor_field
Hi! How can i do to force an in_place_editor_field to format the text with simple_format while not editing? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060104/bbd141a2/attachment.html
2008 Jul 26
4
simple_format, (long) urls, and wrapping
I''m using simple_format to format and display posted content from users. This content sometimes has urls in it. The problem I''m having is that if the urls are long enough to wrap, they do, but the url gets split with a <br> tag. Then, if the user clicks on the link, only the first, non-wrapped part of the link gets posted to the browser... and that''s an invalid
2008 Aug 28
2
tree structure in rails?
Hi, Is there is any way in ruby on rails where we show all my groups there subgroups with check boxes in tree structure way? e.g group A | ----Group A.1 | ----Group A.2 | ---------Group A.2.1 All with check boxes and subgroup opens when click on root ? -- Posted via
2006 Aug 14
3
New line char in a text area field on DISPLAY
I have a text_area to accept upto 1000 chars, which is stored as a blob in mysql. When I try to display the saved data, I dont see the new line characters - however I could see the newline characters in EDIT MODE. So my newline char is lost during displaying. Any ideas how to fix it. thanks thila -- Posted via http://www.ruby-forum.com/.
2008 Jan 22
4
newlines in text_area
Hi @ all I would like to enter a text with a text_area into the database. It runs excellent. But when I want to show the entered text in the show view, all newlines (paragraphs) are deleted and the text is only one block. How can I save the returns (newlines) too? Thanks for helping!! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received
2006 Feb 09
0
Weird simple_format behavior
I''m working on a page combining Ajax.InPlaceEditor and the simple_format helper. The page is demonstrating some very strage behavior. First, here is the code: <p>Bio: </p> <div id="bio"> <% if @user.bio %> <%= simple_format( @user.bio ) %>\ <% else %> No Bio Yet <% end %> </div><em>(click on your to bio edit
2009 Mar 26
0
reverse of simple_format?
Hello! Is there a way to reverse the TextHelper simple_format? I.e. to take some text with <p> tags and <br> tags and convert them into line breaks in a smart way? (smarter than just a regexp that is). TIA! -Danimal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2006 Oct 14
0
A not so simple simple_format helper
Hi, is there a not as simple simple_format helper in rails? :) I would like to keep the line breaks from the input, however, I would like to escape all other HTML elements. So basically it is the h() helper but keeps the line breaks. Any suggestions? Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2007 Jan 16
2
Using view helpers in migrations?
I''m writing a bloggish/CMSish thing. I had been using simple_format, but my users requested a rich editor, so I added TinyMCE. Anyway, I was trying to migrate the existing content (since TinyMCE assumes it''s reading HTML-formatted text), and realized that I couldn''t call simple_format (or other helper methods) from Migrations. Can someone enlighten me here?
2006 Mar 30
2
How do I format text before saving it?
I tried to use a before_save and use simple_format, it returns and undefined method error. Can I even use these methods within a model? I tried to use auto_link and it failed too. What am I doing wrong? Furthermore, would it be recommended I format text before saving it to the database? Advantages or disadvantages? -- Posted via http://www.ruby-forum.com/.
2009 Jan 06
1
How to access text helper and url helper methods in model
Hi, I want to access TextHelper and UrlHelper methods in my model so how i am able to access it ? I was included following helper in my model but still it is not working? also for accessing these helper method w need to give external reference? E.g. class Xyz include ActionView::Helpers::TextHelper include ActionView::Helpers::UrlHelper Also
2008 Dec 28
1
escape character problem
Hi, i need to construct a link as following "<a href=\"#{CONFIG[''URLS''][''Xyz'']}\#{url}\"#{tag_options}>#{name || url}</a>" But here due to escape character #{url} not give actual value it treated as a string. how to solve this ? if i do "<a
2008 Sep 17
1
url_for not working in model
Hi, I am using ''url_for'' for constructing url in my model but it gives me error <NoMethodError: undefined method `url_for'' for Xyz:Class> how to access url_for in model and it possible to call controller method in model and how to call it? Please urgently give reply? -- Posted via http://www.ruby-forum.com/.
2008 May 12
3
photo rotation.
hi in my application i have a photo gallery page where i showing all my album photos, i want to developed a functionality where i can rotate photo there and and saved backed to file system. how it is possible ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2007 Mar 29
1
improving on: truncate(..) + rendered text ?
Hello all, In a summary page I need to show the 1st 100 chars of textilized messages. Problem: truncate(..) would often cut in the middle of html tags => random result. My first idea was to "repair" the broken text with Hpricot (as I use it elsewhere in the project), but it''s not perfect: <h1>abcd</h would give <h1>abcd</h</h1> (I also use
2006 Jan 17
14
Going nuts on ''\n'' to <br />
Hi all, Is there no way to easily resolve this. It can''t be that I''m the first that wants this, and it wouldn''t be RoR if it''s not possible. On the mysql prompt with the select description from todos .. linefeeds are show, so they are there. This is the actual contents with a linefeed after the ":" "Project contacts: delete table, point
2010 Aug 19
4
setting variable for a DID number
Hello, Is it possible to set a variable in dialpan when the someone calls a particular DID number so that i can use that variable for calls coming to that number only. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100819/25402ade/attachment.htm
2006 Apr 18
12
Formatting data drawn from a DB
Question for all: Right now i have a Table in a mySQL DB that has a row called Ingredients. When the data is entered into the DB its enter like so from a text area: 1 1/2 lbs. beef top sirloin, thinly sliced 1/3 cup white sugar 1/3 cup rice wine vinegar 2 tablespoons frozen OJ concentrate 1 teaspoon salt 1 tablespoon soy sauce 1 cup long grain rice 2 cups water 1/4 cup cornstarch 2 teaspoons
2006 Apr 22
5
selenium plugin not working with rails 1.1
Hi, I really like selenium, and I just tried the plugin created Jonas Bengtsson. However I cannot get it to run on rails 1.1 and coundn''t find anyone complaining about it? Did anyone get it to run on rails 1.1.2? Greets, Abdur-Rahman