Undefined method join for STRING error

Hey all,

I was converting a haml file to erb and when finished, I ran the app
and got this error message:

NoMethodError in Students#student_fail

Showing app/views/students/student_fail.erb where line #40 raised:

undefined method `join’ for #String:0x105a5e0c8

Extracted source (around line #40):

37:
38: <% fields << render(:partial =>
“resources_partials/sequence/nav”, :locals =>
sequence_info.merge({:cancel_url => {:controller => :dashboard}})) %>
39:
40: <%= render_form { fields } %>
41: <% end %>

Thanks for any response.

John M. wrote:

Hey all,

I was converting a haml file to erb and when finished, I ran the app
and got this error message:

NoMethodError in Students#student_fail

Showing app/views/students/student_fail.erb where line #40 raised:

undefined method `join’ for #String:0x105a5e0c8

Extracted source (around line #40):

37:
38: <% fields << render(:partial =>
“resources_partials/sequence/nav”, :locals =>
sequence_info.merge({:cancel_url => {:controller => :dashboard}})) %>
39:
40: <%= render_form { fields } %>
41: <% end %>

Thanks for any response.

Render form is defined in resources_form_helper.rb:

def render_form
%Q{

    \n#{ yield.join “\n\t” }\n
\n}
end

On 9 March 2010 22:13, John M. [email protected] wrote:

Showing app/views/students/student_fail.erb where line #40 raised:
40: <%= render_form { fields } %>
41: <% end %>

Thanks for any response.

Render form is defined in resources_form_helper.rb:

def render_form
%Q{

    \n#{ yield.join “\n\t” }\n
\n}

Doesn’t join require an array rather than a string?

Colin

On 10 March 2010 07:58, Colin L. [email protected] wrote:

39:
%Q{

    \n#{ yield.join “\n\t” }\n
\n}

Doesn’t join require an array rather than a string?

I meant it is a method of Array not String of course.

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs