Hi there, I've tried the following solution (Rails 2.3.4 and the latest version of ActiveScaffold), but get an error when trying to edit a record with multiple associations.
Any ideas would be appreciated. http://www.mail-archive.com/[email protected]/msg00272.html ActionView::TemplateError (You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<=>) on line #4 of vendor/ plugins/active_scaffold/frontends/default/views/ _form_association.html.erb: 1: <% 2: parent_record = @record 3: associated = column.singular_association? ? [parent_record.send (column.name)].compact : parent_record.send(column.name).to_a 4: associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order) 5: 6: associated << column.association.klass.new if column.show_blank_record? associated 7: -%> vendor/plugins/active_scaffold/frontends/default/views/ _form_association.html.erb:4:in `sort_by' vendor/plugins/active_scaffold/frontends/default/views/ _form_association.html.erb:4 vendor/plugins/active_scaffold/frontends/default/views/ _form.html.erb:10 vendor/plugins/active_scaffold/frontends/default/views/ _form.html.erb:2 vendor/plugins/active_scaffold/frontends/default/views/ _update_form.html.erb:44 thanks, Johan -- 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.
