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

Invalid output when converting helper call with multi-line args and block #40

Open
jonathanhefner opened this issue Dec 6, 2017 · 1 comment

Comments

@jonathanhefner
Copy link

When converting passwords/edit.html.erb of the Clearance gem, the following snippet...

<%= form_for :password_reset,
      url: user_password_path(@user, token: @user.confirmation_token),
      html: { method: :put } do |form| %>
  <div class="password-field">
    <%= form.label :password %>
    <%= form.password_field :password %>
  </div>

  <div class="submit-field">
    <%= form.submit %>
  </div>
<% end %>

...Is converted to:

= form_for :password_reset,
-         url: user_password_path(@user, token: @user.confirmation_token),
-         html: { method: :put } do |form|
.password-field
  = form.label :password
  = form.password_field :password
.submit-field
  = form.submit

Note the incorrect field indentation, in addition to the incorrect argument formatting. Perhaps it is the same underlying issue though? (i.e. if the multi-line arguments were correctly recognized and formatted, then the block would be too?)

@joaomilho
Copy link
Member

Sorry for the delay. Will try soon.

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

2 participants