similar to: Convert line breaks to paragraph tags

Displaying 20 results from an estimated 20000 matches similar to: "Convert line breaks to paragraph tags"

2006 Feb 27
8
Change Bit Value To Text When Viewed
Hey All, very simple question for you folks ;) I have a @commutes object that for each record there is a bit value set (0/1) to denote if an accident occurred. What I want to do is have it display "Yes" or "No" when I view the listing of commutes. I can get it to display the bit value just fine with <%= commute.accident %> but how can I get it so that when a record with
2006 May 05
3
OT: Require e-mail during sign up process?
Sorry that this thread is a little off topic, but I''m looking for some varying opinions on the subject and I think this group has a breadth of experience on this matter :) A little background info... the registration process for a web application I am developing will be targeting those ages 13+ with the bulk of the users being in the 13-25 age range. We are in the process of developing
2006 Apr 21
1
Data access problem in object when using acts_as_authenticated
Hi all, I''m running into this frustrating issue with the acts_as_authenticated plugin and one of the additional fields I added to the users table. I have added a column ''account_type'' to the users table (among several others) which denotes the type of account it is. This stores an integer value that is set by the system during account creation. The value is getting set
2006 Jun 29
9
Handling multiple developers making migrations and using svn
Hey all, I''ve run into an interesting scenario that I think some of you might have some suggestions on. I am currently working on a RoR project and we are making full use of the migrations. We are also using a subversion repository for our source control. Now, the problem.... We are both making migrations and checking them into SVN. So, if in our checkout we have migrations up to 10 and
2006 Apr 29
1
Display SVN Revision Number in a View
Is it possible to display the SVN revision number in a view? I''d like for this to be done automatically and not something that I''d have to update each time the revision is updated. I know that it is kept in a .svn file or something, but I am curious if anybody out there has done something similar in the past. Thanks, Ryan -- Ryan Prins rprins@gmail.com http://www.lazyi.net
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth? I''m doing: self.body_html = RedCloth.new(self.body).to_html(:textile) which works, except that it doesn''t transform hard breaks to <br /> tags, which is really important for me. However, if I do: self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile) then it converts ALL breaks into <br
2006 Apr 27
2
check_box_tag and :disabled => ''disabled'' problem
I''ve been using the check_box_tag to generate checkboxes for an application I am working on and I''ve run into a little hiccup. When I set the options for the checkbox to be { :disabled => "disabled" } the checkbox becomes disabled, as I would expect. However, if I set the checked value to true and keep the disabled option, the value for the checkbox is not returned.
2006 May 11
2
open and close helper tags?
Hello everyone. I have a custom thumbnail gallery that I am creating with images pulled in a specific order from an array of image ID#s. What I essentially want to do is have a helper-setup where I can do an opening helper tag, such as <% open_image_gallery %> and then be able to place inside of it specific tags associated to the options specified in the opening tag, say the list of
2006 Jun 21
2
error_messages_for not displaying validation errors
Hi all, I''ve been searching the web and the list archives for help on this and I''ve found some tips, but I''ve been racking my brain on this for hours. I have a Model, View, and Controller that are handling the uploading of a file to my server. I want to make sure that the description is set and that a file is selected to be uploaded. I have set validates_presence_of
2006 Apr 18
1
Save item to DB x times (howto)?
Hi All, I have a pretty simple question. I have a view that offers the user the following: 1. A text field to enter in a passphrase 2. Another text field to define how many times that phrase is written to the DB It probably doesn''t make sense for it to be written to the DB x times, but this is the first step in a process and the passphrase will become unique. I currently
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base
2007 Jan 16
1
<BR> and <P> in RedCloth v. Textism
Hi, I''m using RedCloth right now for some simple markup in a Rails project. It''s simple and easy - thanks for a great tool! I have a question about an apparent discrepancy between RedCloth and Textile, relating to newline characters. I''ve played with the "hard_breaks" feature and that seems to generate it''s own problems.. If I go onto the Textile
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 Feb 28
1
Validate two fields so they do not match
Hey all, I have two form fields (select dropdowns) that are ''startlocation'' and ''endlocation''. These two cannot be equal to each other on save and I am wondering how to put validation into the model for this. Is is possible to do it in the model, or do I need to do this in the controller? Thanks in advance! Ryan -- Ryan Prins rprins@gmail.com
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
2006 Jul 21
2
Migration Date Format
Just wandering if anyone can tell me how to format date when writing test data to upload to the db via a migration. ie, to match the date migration column format thanks -- Posted via http://www.ruby-forum.com/.
2006 Jul 23
2
pagination_links and friendly urls
my pagination_links seems to auto generate the links using the current controller, action and id. The page they''re appearing on however have a friendly url I have created. I want to be able to make pagination urls generated by pagination_links "user friendly" as well so that they match my current naming convention.....i know there must be a way to do this....any ideas?
2006 May 12
3
How to implement a global partial?
Quick question: Whats the easiest way to implement a global partial? Where I can call one partial from many different controllers (err controller views)? -- Posted via http://www.ruby-forum.com/.
2006 Apr 27
2
Red cloth
what is the require I must put in my enviremnt to use red cloth? -- Posted via http://www.ruby-forum.com/.
2006 Mar 02
3
validates_uniqeness_of
Hello, I am trying to understand usage of validates_uniqeness_of. Say I have, two column ''name'' and ''email'' in my table users three unique key is possible for these two columns 1. name 2. email 3. name and email together My question is, if I write validates_uniqueness_of :name, :email what uniqueness is it going to apply, 1 and 2 or, 3 ? Thanks, Mohammad