Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Associations not used

#8

Hello, If I have an association, such as belongs_to, and I attempt to do an import like so: @parent.things.import fields, data the imported objects do not have a parent_id in them. (to be fair, there was no such column in the input data) Also, my models validates_presence_of :parent_id did not get triggered on my import.

So, It would be nice if there was a way, perhaps an option, where I could pass in a hash, that can be added to each row before the insert happens. This would allow me to do something like :options => { :add_values => { :parent_id => 3} } Forgive me if the syntax is messed up, I'm pretty much a nuby on rails.

Thanks, John Schank

Reported by jschank · August 23rd, 2008 @ 02:19 AM

State: new
Milestone: none
Assigned to: Zach Dennis Zach Dennis

Activity

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.