Jump to content


Chapter 8 Live Edition - Adding Automation

  • Please log in to reply
2 replies to this topic

#1 zephed56


    New Member

  • Members
  • Pip
  • 2 posts

Posted 06 June 2010 - 05:30 PM

I'm using rails 2.3.8 and ruby 1.8.6 and reading the live edition.

The following code works as far as producing both a label and a text input while only having to write one line in the view, but the less than and greater than symbols in the break tag are being converted to html character entities before they get to the browser.
def text_field(method, options={})
label_for(method, options) + super(method, options)

def label_for(method, options={})
label(options.delete(:label) || method) + "<br />"

My html output therefore looks like this:
Name<br /> [the input box is here]

That <br /> does not turn into a line break.

Any help? The following section with the wrap_field methods does the same thing, the div's and spans display as text.

#2 simonstl


    Active Member

  • O'Reilly Editor
  • PipPip
  • 35 posts

Posted 07 June 2010 - 05:35 PM

Sorry for the delay - I was travelling to, of all things, RailsConf.

My bet is that something broke in the major round of bug fixing between 2.3.5 and 2.3.8, but I'll need to make that update on a better network than I have at the moment. I've been focusing on 3.0 a little too squarely!

I'll try to have a real answer to you tomorrow.

#3 zephed56


    New Member

  • Members
  • Pip
  • 2 posts

Posted 07 June 2010 - 07:01 PM

Take your time, no rush.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users