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| %>
<p>
<%= link_to File.basename(hwk.file_name), url_for_file_column(hwk,
"file_name") %>
</p>
<% 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: <p>
7: <%= link_to File.basename(hwk.file_name), url_for_file_column(hwk,
"file_name") %>
8: </p>
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''
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---