Hi there,

newbie making first steps with active_scaffold - and starting to love
it :-) However just ran into a problem.

I am using a simple act_as_tree for modeling hierarchically nested
categories.

create_table "categories", :force => true do |t|
    t.string   "name"
    t.string   "description"
    t.integer  "parent_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

class CategoriesController < ApplicationController
  active_scaffold :category
end

class Category < ActiveRecord::Base
  acts_as_tree :order => :name
end

and most things work as expected.

The /categories/ action shows a column "parent" and when a category
has no parent the centered text "Create New" shows up. Clicking on
this, however, produces 500 boiling down to

Processing CategoriesController#new (for 127.0.0.1 at 2010-01-13
11:56:41) [GET]
  Parameters: {"parent_column"=>"children",
"adapter"=>"_list_inline_adapter", "parent_id"=>"8",
"parent_model"=>"Category"}

NoMethodError (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.+):

I find it noticeable that in the lengthy stack trace, active_scaffold
does not show up at all.

This is with rails 2.3.4 and render_component in the rails-2.3 branch.
-- 
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.


Reply via email to