Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
String iteration using each_line
8 Posts
String iteration using each_line

Also to exchange the season when more heat wear, wear less cold, we are not worried about this time in the end is what it is appropriate to wear, what to wear only type it? Do not worry, take a look at the stars beat the street know, just add pieces of uniforms, warm and be stylish. http://www.elinkslondon.com/

If you use the alternate loop style instead, it'll work:

for instruction in @recipe.instructions

In this case, it does the same thing as each_line, and this won't raise any deprecation errors.

Jason, Actually I was getting the following deprecation warning on that line (DEPRECATION WARNING: style block helpers are deprecated. Please use ), so I added the = and the warning goes away but the output is still the same. I'm using rails 3 rc2 with ruby 1.9.2dev (2010-07-11 revision 28618).

I know this has to be something simple but I'm new to ruby and rails :(


You have this on line 49: @@ but that's an output ERB tag, it should just be @@

Using the output tag is causing the value of that block to be output, as well as the block itself.

I saw your Controller File. In Which method u select the @recipe variable

Actually it is using html, the code didn't show up correctly in this post. See line 50 here http://github.com/quattro004/scratches/blob/master/app/views/recipes/show.html.erb

Any other ideas? Thanks.

Hey Man use HTML Tag

&lt li &gt &lt /li &gt

Use this Code to Get tour Desired Output

I have the following code which displays instructions in an ordered list. When it's rendered in the browser, it outputs all of the instructions at the end in a single line. Am I doing something wrong? See output below for example.



Instructions: Roast garlic test eat icecream Roast garlic test eat icecream

Rails 3 rc2 ruby 1.9.2dev (2010-07-11 revision 28618)

8 Posts
Login to add your message