I've already got a working create button behaving exactly as I want it
to (with a bunch of fancy controller update code working with it). Now
i need a select-many instance in the same context as this create
button. Here's the breakdown:
1) The create button has a custom create action that grabs all kinds
of information in the context of the page which is saved to the
database
2) I want to add a select-many to the context of the create button
form allowing a user to select several instances of another model to
be linked to the instance being created by the create button. I've
already got the has-many to has-many relationship setup via a :through
=> relationship in the models.
What would the code look like to sequence a select-many inside of a
create button form? Can you even do that?
My models have the following pertinent relationships
order_assist has_many topping_assist, accessible => true
order_assist has_many toppings through => topping_assist, accessible
=> true
topping has_many topping_assist
topping has_many order_assist
topping_assist belongs_to topping
topping_assist belongs_to order_assist
I tried the following but nothing is showing up:
<create-button:order_assist update="" message="" label="add">
<select-many:toppings update=""/>
</create-button>
After reviewing the edit page for order_assists, I found hobo
autogenerated the style of selection i wanted from the select-many. I
checked the auto/rapid/forms file and it looks pretty simple. it just
calls field-list fields="..., toppings, ..." which got me thinking I
should just add that field to the create button. So i tried
<create-button:order_assist update="..." message="..." label="..."
fields="toppings"/>
but i get a "string not matched" error referring to the
fields="toppings" param
So should I be trying to pass fields to the create button? or passing
a select-many inside the create button? Or something completely
different?
Code example would help too!
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en.