I have an insurance database; the database contains one relationship (policies->contact) policies belongs to contact; now when I open up the policies controller page in IE; 1. if I add helper in policies_helper.rb and have record.contact.name or record.contact.city using field_column definition, it shows up sometime, and not others, when I sort it base on anything, it will throw an error; a. I add the filed in config.columns[:a, :b, ...., :contact, :city] b. I add "city_column" def in the policies_helper.rb file with "record.contact.city" reference; c. then in policies controller, it shows up fine (at first) d. I sort the policies listing by any column, error occur, see error below #NoMethodError in Policies#index # #Showing vendor/plugins/active_scaffold/frontends/default/views/ _list_record.rhtml where line #10 #raised: # #undefined method `city' for #<Policy:0xb7664844> # #Extracted source (around line #10): # #7: #8: <tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => #record.id) %>"> #9: <% active_scaffold_config.list.columns.each do |column| %> #10: <% column_value = get_column_value(record, column) -%> #11: #12: <td class="<%= column_class(column, column_value) %>" > #13: <%= render_list_column(column_value, column, record) %> ## #Trace of template inclusion: /vendor/plugins/active_scaffold/ frontends/default/views/_list.rhtml, #/vendor/plugins/active_scaffold/ frontends/default/views/list.rhtml # #RAILS_ROOT: /var/www/html/insurance_dev/public/../config/..
2. if 1 is done and it shows up, then using "Csv Export Action Plugin" I can't export any file Any help is appreciated as I don't quiet understanding the complete scope of the association relationship handling of activescaffold --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
