I've got problems with an instance variable in a controller.
the varible is initialized and has some entries which i give out in
the
second view(create). but in the third view (export) I become back this
message:
...............ActionView::Template::Error (undefined method `length'
for nil:NilClass):
1: <%=@month_issues.class%>
2: <%=@month_issues.length%>
3: <%@month_issues.each do |mi|%>
4: <%= mi.text %>
5: <%end%>
plugins/abrechnung/app/views/abrechnung/export.html.erb:2:in
`_plugins_abrechnung_app_views_abrech
nung_export_html_erb___625827306_55588872'.............
But in abrechnung_controller the vaiable is initialised as Array with
some antries, how it can be nil?
Attachments:
http://www.ruby-forum.com/attachment/10248/abrechnung_controller.rb
http://www.ruby-forum.com/attachment/10249/month_issue.rb
http://www.ruby-forum.com/attachment/10250/export.html.erb
http://www.ruby-forum.com/attachment/10251/routes.rb
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/34ee4b1381c65993c6b8ccd240cba3e7%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.