Some things seem broke

1 view
Skip to first unread message

Timothy Johnson

unread,
Nov 4, 2008, 10:00:49 AM11/4/08
to attribute_fu
The following features are not working for me with a_fu in a new app:

1. When creating a new parent object with attribute models, everything
DOES work
2. When editing a parent object, previous attributes save OK, but new
ones get saved without being scoped to the parent (in the DB, foreign
key is NULL)
3. the DISCARD_IF functionality is not working for me, nor is the
"remove_blank_tasks" callback from your blog.

In the codebase, I looked through and notice that the associated
objects have "build" called on them, which saves them to the database
BEFORE you run the evaluation to see whether they should be deleted or
not. Also they get saved to the db before my "before_save" callback is
run too. I wonder if this is a conflict with the latest Rails or
something else? Can you shed some light on it?

Tim Johnson

illusina

unread,
Nov 19, 2008, 12:31:37 AM11/19/08
to attribute_fu
I am also experiencing point 2:

> 2. When editing a parent object, previous attributes save OK, but new
> ones get saved without being scoped to the parent (in the DB, foreign
> key is NULL)

On point 1: Though my saves do occur when the data is input correctly,
I another issue where upon invalidation, the message appears twice
(e.g. Your model is invalid, your model is invalid).

On any new/edit form with an association and add_associated_link that
an invalidation occurs, I get another copy of the child form built
without any indication as to why.

I'm running the latest git copy with edge rails 2.2.

- Tyler
Reply all
Reply to author
Forward
0 new messages