Problem with file_column url generator

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:inurl_for_file_column’
#{RAILS_ROOT}/app/views/homework/list.rhtml:7:in
_run_rhtml_47app47views47homework47list46rhtml' #{RAILS_ROOT}/app/views/homework/list.rhtml:5:ineach’
#{RAILS_ROOT}/app/views/homework/list.rhtml:5:in
`_run_rhtml_47app47views47homework47list46rhtml’

gordon wrote:

<% @lst.each do |hwk| %>

<%= link_to File.basename(hwk.file_name), url_for_file_column(hwk, "file_name") %>

<% end %>

Active Record form helper always require an instance variable name
for their first arguments. So write:

<% @lst.each do |@hwk| %>

<%= link_to File.basename(@hwk.file_name), url_for_file_column(:hwk, "file_name") %>

<% end %>


We develop, watch us RoR, in numbers too big to ignore.