Our app is getting a "string sizes too big" error in an .erb file that
is trying to render a large block of checkboxes that represent color
attributes that belong_to the product being edited in this view. The
code worked fine when we had a small number of colors -- now that the
number of colors is 750+, we get an error on the fields_for line (see
below).
Since this sounds somewhat like some older memory leak issues, I
confirmed that our host, Engine Yard, does not have an old Ruby
version (they are on 1.8.6 patch level 287). The same error occurs on
Mac OS/X with Ruby 1.8.6 patch 369.
I've had no luck searching for that error with "fields_for" or finding
any docs on size limitations inherent to fields_for.
Processing Admin::ProductsController#edit (for 173.45.210.193 at
2010-04-29 05:21:30) [GET]
Parameters: {"id"=>"17"}
Rendering template within admin/layouts/base
Rendering admin/products/edit
ActionView::TemplateError (string sizes too big) on line #67 of app/
views/admin/products/edit.html.erb:
64:
65: <div id="colorCheckboxes"> <!-- event handler searches within
this div to find checkboxes -->
66: <% previousObject = nil -%>
67: <% f.fields_for :prod_method_colors do |pmc| -%>
68: <% pmcObj = pmc.object %>
69: <%= "<br/><br/> Colors for
#{PRINT_METHOD_TEXT[pmcObj.print_method]} <br/>" if previousObject ==
nil || (pmcObj.print_method != previousObject.print_method) %>
70: <% previousObject = pmcObj -%>
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment