Hi,
I have the following in a viewer
Here, @lst = Homework.find(:all) is an array of homeworks. I checked
this this is correct.
Based on the error below, somehow, the url_for_file_colum does not
like to act on the model element.
I checked the source code to url_for_file_column, and the problem is
with instance_variable_get().
I have no idea wat is going on! Any help is appreciated. Gordon.
<% @lst.each do |hwk| %>
<%= link_to File.basename(hwk.file_name), url_for_file_column(hwk, "file_name") %>
<% end %> ---------------------The File.basename(xxx) prints properly. However, I get the following
message for url_for_file_column:
4: <%# for hwk in @list %>
5: <% @lst.each do |hwk| %>
6:
7: <%= link_to File.basename(hwk.file_name), url_for_file_column(hwk,
“file_name”) %>
8:
9: <% end %>
10: </div class=“list”>
RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace
vendor/plugins/rails_file_column/plugins/file_column/branches/kyle/lib/
file_column_helper.rb:58:in instance_variable_get' vendor/plugins/rails_file_column/plugins/file_column/branches/kyle/lib/ file_column_helper.rb:58:in
url_for_file_column’
#{RAILS_ROOT}/app/views/homework/list.rhtml:7:in
_run_rhtml_47app47views47homework47list46rhtml' #{RAILS_ROOT}/app/views/homework/list.rhtml:5:in
each’
#{RAILS_ROOT}/app/views/homework/list.rhtml:5:in
`_run_rhtml_47app47views47homework47list46rhtml’