Rails and .html.erb files

Asked by Perry Smith

This is probably more of a mumamo question. In Rails' view files, there are things like:

<p style='width: 40em;'>
  Enter a defect, APAR, PTF, Lpp name (e.g. bos.rte) or Fileset
  (e.g. bos.rte 5.3.0.30 -- with the space. The VRMF can be
  incomplete such as 5.3.8)
  <% form_tag swinfos_form_path do -%>
    <%= text_field_tag "item" %>
    <%= submit_tag nil, :class => "concat-fields" %>
  <% end -%>
</p>

The <% ruby code... do %> starts a new indent level. With my current set up, the ruby code is recognized but if I hit tab on the two lines that start with <%=, the first one is indented by 4 and the second is indented by 2. In other places in this file, the same basic thing indents the first by 2 and the second by 0. So, it isn't really understanding things.

I plan to play around with this but thought I'd post here to see if anyone has solved this yet. Surfing the net didn't find any real solutions.

Thanks,
Perry

Question information

Language:
English Edit question
Status:
Answered
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
lborgman (lennart-borgman) said :
#1

I have converted this to a bug, see Related bugs.

Can you help with this problem?

Provide an answer of your own, or ask Perry Smith for more information if necessary.

To post a message you must log in.