<html>
<body>
<textarea>if indent then
__indent
end</textarea>

__<textarea>if indent then
__indent
end</textarea>

</body>
</html>

When viewed in the browser:

the first <textarea> appears as and will be saved as thus:

if indent then
__indent
end

similarly, 2nd <textarea> appears as and will be saved as thus:

__if indent then
____indent
__end


On Feb 18, 10:24 pm, Colin Law <clan...@googlemail.com> wrote:
> On 18 February 2011 11:13, khoan <huu.khoa.ngu...@gmail.com> wrote:
>
> > I have tried:
>
> > _form.erb:
>
> > <% form_for ... do %>
> > __<%- safe_concat '<textarea>this is unindented</textarea> %>
> > <% end %>
>
> > which would output:
>
> > <html ...>
> > __<form ...>
> > __<textarea>this is unindented</textarea>
> > __</form>
> > </html>
>
> The question is why that matters to you.  On screen or print it should
> look exactly the same as
> <html ...>
> <form ...>
> <textarea>this is unindented</textarea>
> </form>
> </html>
>
>
>
>
>
>
>
>
>
> > On Feb 18, 4:05 am, Colin Law <clan...@googlemail.com> wrote:
> >> On 17 February 2011 11:26, Jim Ruther Nill <jvn...@gmail.com> wrote:
>
> >> >> I don't think so, have you tried it and checked the html (View > Page
> >> >> Source or similar in the browser).  The line
> >> >>  __<%= render 'unindented' %>
> >> >> says output underlines then render unindented.  There is no way that
> >> >> you can remove the underlines before the <%= render %>.  However why
> >> >> not just put, at the start of the line
> >> >> <%= render 'unindented' %>
> >> >> However I do not understand why it matters.  None of this will give
> >> >> you extra space *inside* the textarea.
>
> >> >> Colin
>
> >> > Colin, i'm just clarifying what the OP meant. He replaced the tabs/spaces
> >> > with underscores so it would be easy to picture.
> >> > He wanted to remove the indentation for the textarea tag so it would be 
> >> > in
> >> > line with the html tag when you look at the
> >> > html source.
> >> > To the OP, I don't think there's an erb option that would give you what 
> >> > you
> >> > want.
>
> >> I Knew that, I also was showing underscores for spaces.  The point is
> >> that only spaces that the op includes in the erb will be copied
> >> through to the html.
>
> >> Colin
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Ruby on Rails: Talk" group.
> > To post to this group, send email to rubyonrails-talk@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > rubyonrails-talk+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to