Help needed with http://www.redmine.org/issues/2560

Added by Matt H over 11 years ago

I'm trying to get http://www.redmine.org/issues/2560 working.

I've patched all the required files, but the also get an 'Internal Server Error' when going to the bulk edit page.

The production.log file shows the following error:

ActionView::TemplateError (undefined method `each' for nil:NilClass) on line #43 of issues/bulk_edit.rhtml:
40: </p>
41: 
42: <p>
43:    <% @custom_fields.each do | field | %>
44:          <%= content_tag "label", field.name,:for => "custom_fields_#{field.id}" %>: <%= custom_field_tag_bulk_edit field %>
45:    <% end %>
46: </p>

The code added to issues/bulk_edit.rhtml was:

<p>
   <% @custom_fields.each do | field | %>
         <%=content_tag "label", field.name,:for => "custom_fields_#{field.id}" %>: <%= custom_field_tag_bulk_edit field%>
   <% end %>
</p>

I'm afraid I don't know enough Ruby to fix this straight away, but if some one could point me in the right direction that would be great.

Replies (2)

RE: Help needed with error: undefined method `each' for nil:NilClass from http://www.redmine.org/issues/2560 - Added by Matt H over 11 years ago

Information about my environment:

GLoc v1.1 running in development mode. Strings can be modified at runtime.
About your application's environment
Ruby version 1.8.6 (i386-linux)
RubyGems version 1.3.1
Rails version 2.1.2
Active Record version 2.1.2
Action Pack version 2.1.2
Active Resource version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Edge Rails revision unknown
Application root /opt/redmine-0.8.3
Environment development
Database adapter mysql

RE: Help needed with http://www.redmine.org/issues/2560 - Added by Jim Wright over 11 years ago

Did you ever find a solution to this? I'm getting the same error.

(1-2/2)