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)
Hey Man use HTML Tag
< li > < /li >
Use this Code to Get tour Desired Output
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.
I saw your Controller File. In Which method u select the @recipe variable
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.
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 :(
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.
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/