
I am getting [nil_class] in my forms with multiple parents
Reported by powertoaster | March 14th, 2009 @ 08:29 AM
I have a document object.
class Document < ActiveRecord::Base
belongs_to :devicetype belongs_to :doctype belongs_to :manufacturer
end
class Manufacturer < ActiveRecord::Base
has_many :documents end
class Devicetype < ActiveRecord::Base
has_many :documents end
class Doctype < ActiveRecord::Base
has_many :documents end
In my search form I have fields for all three parents.
This works beautifully for the first parent and any fields of the
document object but any parent fields after the first come back as
nil_class here is what gets generated.
I have attached my index.html.erb so that you can see how I am calling the helper.
Comments and changes to this ticket
-
Ben Johnson March 23rd, 2009 @ 02:44 AM
- State changed from new to resolved
Sounds good, thanks for the update.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Provides common named scopes and object based searching.