Wow, that sort of works actually.
So I changed the Order model like so:
has_many :product_orders, :accessible => true
has_many :products, :through => :product_orders, :accessible =>
false
And now it looks like this:
New Order
Product Orders
Quantity <textbox>
Product <dropdown> [+] [-]
Quantity <textbox>
Product <dropdown> [+] [-]
clicking the + button adds another Quantity/Product box. The only
problem with this is that the dropdowns for Products will let you
choose the same product multiple times. When I was using Product
instead of ProductOrders, you could select multiple products and
previously selected products would be disabled/greyed-out.
That looked like this:
New Order
Products SelectedProduct1
SelectedProduct2
<dropdown-Add Product> (The dropdown would not
let you select SelectedProduct1 or SelectedProduct2 in this case.)
Now what I really want would look like this:
New Order
Products SelectedProduct1 Quantity: <textbox>
SelectedProduct2 Quantity: <textbox>
<dropdown-Add Product> (The dropdown would not
let you select SelectedProduct1 or SelectedProduct2 in this case.)
I'll keep playing with it and post back here if I figure out a
solution before you or another hobo genius clues me in. Thanks!
Brian
On Dec 2, 11:43 am, Matt Jones <[email protected]> wrote:
> On Dec 2, 2009, at 2:34 PM, Brian Corbin wrote:
>
>
> You might want to try changing the product_orders association to being
> accessible - that's what you're really creating on the Order page
> (assuming that customers don't get to make up their own products).
> I'll take a more in-depth look at this later tonight, if that doesn't
> work.
>
> --Matt Jones
--
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.