A Dumper of the field after calling ->default_values shows values => [ 1, 2 ]
in the Checkboxgroup object, but the ->options->{ attributes } hashes are
empty.
Spoke too soon -- this is supposed to happen, as the checked is set later on
when the item is actually rendered. I found my issue, (my r
On Sat, 21 Nov 2009, Carl Franks wrote:
2009/11/20 Justin W :
I have:
volunteers
-> has_many volunteer_job_types
-> many_to_many job_types
job_types
-> has_many volunteer_job_types
-> many_to_many volunteers
It looks like these test files describe what you're trying to achieve:
t/
2009/11/20 Justin W :
>
> I have:
>
> volunteers
> -> has_many volunteer_job_types
> -> many_to_many job_types
>
> job_types
> -> has_many volunteer_job_types
> -> many_to_many volunteers
It looks like these test files describe what you're trying to achieve:
t/default_values/many_to_many_s
It should be as simple as naming the Checkboxgroup after the
many-to-many relationship.
If that doesn't work, can you post your schema code and form config?
Oh, and what part isn't working: default_values() or update() ?
OK, my classes are pretty simple. (I simplified in my original e-mail.)
2009/11/18 Justin W :
> Hi,
>
> I'm wondering if FormFu's magic can handle my situation or if I have to
> write custom code.
>
> I have 3 tables.
>
> users
> roles
> user_role_map
>
> I want to creat an admin page where someone can add/change roles on a user
> using a checkboxgroup.
>
> The checkbo