# Undefined method error appears in erb but not haml

**URL:** <https://www.ruby-forum.com/t/undefined-method-error-appears-in-erb-but-not-haml/184146>\
**Category:** Rails\
**Created:** [February 25, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/undefined-method-error-appears-in-erb-but-not-haml/184146 "2010-02-25T17:56:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [February 25, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/undefined-method-error-appears-in-erb-but-not-haml/184146/1 "2010-02-25T17:56:26Z")

</div>

Hey all,  
All I wanted to do was convert a haml file to erb. After doing so, i get  
an undefined method `render\_sequence\_nav’ error message. Even though no  
such error happened when it was in haml format. I believe the culprit is  
this line which I am converting incorrectly:

#fields \<\< render\_sequence\_nav(sequence\_info, students\_path)

This is what I got:

\<%:ruby %\>  
\<% sequence\_info = {  
:label =\> “Student Fail”,  
:steps =\> [“Select Student”, “Enter Criteria”],  
:num\_steps =\> 2,  
:selected\_step =\> @step  
} %\>

\<%= render\_breadcrumb\_trail %\>

\<%= render :partial =\> “resources\_partials/sequence/header”, :locals  
=\> sequence\_info %\>

```
<%= render :partial => "resources_partials/sequence/step_heading",

```

:locals =\> sequence\_info %\>  
\<%= render :partial =\> “resources\_partials/sequence/errors” %\>

\<% form\_for(@student, :url =\> {:action =\> :student\_fail}, :html =\> {:id  
=\> “sequence”, :class =\> “student fail”}) do |f| %\>  
\<%= f.error\_messages %\>

```
<%:ruby %>
<% fields = if @step == 1%>
   <%= [ select_tag(:id,

```

options\_from\_collection\_for\_select(Student.failed, :id, :selector\_label,  
@student.id), :size =\> 10) ] %\>

```
 <% fields = if @step == 2%>

    <%= collection_select(:student_fail, :student_fail_state_id,

```

StudentFailState.all, :id, :key) %\>  
\<%= submit\_tag ‘Submit’ %\>

```
    <% end %>
    <% end %>

```

\<% fields \<
 \<% fields \< "resources\_partials/sequence/nav", :locals =\> sequence\_info.merge({:cancel\_url =\> {:controller =\> :dashboard}})) %\> \<%= render\_form { fields } %\> \<% end %\>

Any ideas as to what’s converted incorrectly? Thanks.
