Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using :erb filter multiple times repeats all previous :erb filter content. #161

Open
fleitz opened this issue Jun 27, 2019 · 1 comment
Open

Comments

@fleitz
Copy link

fleitz commented Jun 27, 2019

%h1 Foos
:erb
  <%= "test" %>
:erb
  <%= "test" %>

Expected Result:
test is printed twice.

Actual Result:
test is printed three times.

The more times you use the ERB filter the more times it repeats all previous :erb filter content.

Running this view through haml on the command line produces the intended result, so I believe this is an issue with the way haml interacts with rails.

Produced this result by using only rails new rails_test and then adding the haml-rails and haml gems to the Gemfile and scaffolding a foos_controller.

From Gemfile.lock:

haml (5.1.1)
  temple (>= 0.8.0)
  tilt
haml-rails (1.0.0)
  actionpack (>= 4.0.1)
  activesupport (>= 4.0.1)
  haml (>= 4.0.6, < 6.0)
  html2haml (>= 1.0.1)
  railties (>= 4.0.1)

rails (5.2.3)
  actioncable (= 5.2.3)
  actionmailer (= 5.2.3)
  actionpack (= 5.2.3)
  actionview (= 5.2.3)
  activejob (= 5.2.3)
  activemodel (= 5.2.3)
  activerecord (= 5.2.3)
  activestorage (= 5.2.3)
  activesupport (= 5.2.3)
@fleitz fleitz changed the title Duplicate Content when using :erb filter Using :erb filter multiple times repeats all previous :erb filter content. Jun 27, 2019
@fleitz
Copy link
Author

fleitz commented Jun 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant