1
0
Fork 0
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:
Rafael Mendonça França 2019-03-11 17:49:27 -04:00
parent cab396f423
commit cfa22f1a4b
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
2 changed files with 5 additions and 1 deletions

View file

@ -11,6 +11,9 @@ end
class DummyCompiler < ERB::Compiler # :nodoc:
def compile_content(stag, out)
out.push "_erbout << 'dummy_compiler'"
case stag
when '<%='
out.push "_erbout << 'dummy_compiler'"
end
end
end

View file

@ -53,6 +53,7 @@ module ApplicationTests
test "db:create and db:drop respect environment setting" do
app_file "config/database.yml", <<-YAML
<% 1 %>
development:
database: <%= Rails.application.config.database %>
adapter: sqlite3