Displaying 3 results from an estimated 3 matches for "erb_trim_mode".
2006 Feb 20
4
SHow do you suppress ERB newlines globally
Is there a config flag to suppress the newline at the end of every ERB
''%>'' tag, so it would not be necessary to type ''-%> each time?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for
suppressing trailing newlines. Thus
erb -n script
gives errors. Where is Rails ERB so I can invoke it directly?
Thank you
Hugh
2010 Apr 19
10
Overview of Ruby 1.9 encoding problem tickets
...ult of ERB, is not acceptable, unless the
"internal" encoding would also be BINARY. I would propose merging the
following with the patch above:
def compile(template)
input = "<% __in_erb_template=true %>#{template.source}"
src = ::ERB.new(input, nil, erb_trim_mode, ''@output_buffer'').src
if RUBY_VERSION >= ''1.9'' and src.encoding != input.encoding
if src.encoding == Encoding::ASCII_8BIT
src = src.force_encoding(input.encoding) #ERB workaround
else
src = src.encode(input...