mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Do not generate dummy string when the tag used is not the <%=
This commit is contained in:
parent
cab396f423
commit
cfa22f1a4b
2 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,9 @@ end
|
||||||
|
|
||||||
class DummyCompiler < ERB::Compiler # :nodoc:
|
class DummyCompiler < ERB::Compiler # :nodoc:
|
||||||
def compile_content(stag, out)
|
def compile_content(stag, out)
|
||||||
|
case stag
|
||||||
|
when '<%='
|
||||||
out.push "_erbout << 'dummy_compiler'"
|
out.push "_erbout << 'dummy_compiler'"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -53,6 +53,7 @@ module ApplicationTests
|
||||||
|
|
||||||
test "db:create and db:drop respect environment setting" do
|
test "db:create and db:drop respect environment setting" do
|
||||||
app_file "config/database.yml", <<-YAML
|
app_file "config/database.yml", <<-YAML
|
||||||
|
<% 1 %>
|
||||||
development:
|
development:
|
||||||
database: <%= Rails.application.config.database %>
|
database: <%= Rails.application.config.database %>
|
||||||
adapter: sqlite3
|
adapter: sqlite3
|
||||||
|
|
Loading…
Reference in a new issue