| Summary: | Upload error | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Onno van der Straaten <onno.van.der.straaten> |
| Component: | EPF | Assignee: | Onno van der Straaten <onno.van.der.straaten> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Onno van der Straaten
Upload causes error undefined method `length' for #<Enumerable::Enumerator:0xb667a6a4>
24: <td><%= link_to upload.filename, upload.url %></td>
25: <td><%= upload.upload_type %></td>
26: <td><%= upload.content_type %></td>
27: <td><%= truncate(strip_tags(upload.description))%></td>
Problem in truncate so this can by replacing by <td><%= strip_tags(upload.description)%></td> Seems to be a bug in Rails < 2.2 and Ruby 1.8.7. The only way to fix (without upgrading Rails version) is to override the Rails truncate method. Workaround for now is to not use truncate there. So replace in uploads/_list.rhtml on line 27 <%= truncate(strip_tags(upload.description))%> with <%= strip_tags(upload.description) %> There might be other places where truncate is used and this could be a problem. Another example of this problem in link_to_comment. http://dev.eclipse.org/mhonarc/lists/epf-dev/msg03635.html |