Yes Sergio, that does work, and no cookie overflow errors.
Thank you so much.  This is where it gets exciting for me.

On Nov 18, 8:09 am, "Sergio Cambra .:: entreCables - Symbol Servicios
Informáticos S.L. ::." <[EMAIL PROTECTED]> wrote:
> El Tuesday 18 November 2008 15:54:55 cntrytwist escribió:
>
> > Thank you for your reply.  You sure pointed me in the right
> > direction.  I'll give my solution here for others to follow.  I'll
> > probably also update the wiki as well.
>
> > When I attempted to use {:orders => @record}
> > I got a cookie overflow error.  So I switched to using the database
> > for my session store, and everything works as expected.
>
> > Thank you again for your assistance, and once again, this proves I've
> > been trying too hard.  ActiveScaffold makes it very easy.
>
> Maybe :orders => @record.id works too without cookie overflow.
>
>
>
>
>
> > On Nov 18, 7:24 am, "Sergio Cambra .:: entreCables - Symbol Servicios
>
> > Informáticos S.L. ::." <[EMAIL PROTECTED]> wrote:
> > > El Tuesday 18 November 2008 15:11:35 cntrytwist escribió:
> > > > I'm having trouble constraining an embedded scaffold of a HABTM
> > > > association.  I'm sure it's just me, and that by posting this question
> > > > I'll be showing just how little I understand the simplicity of
> > > > ActiveScaffold.  But here goes anyway.
>
> > > > class Contact < ActiveRecord::Base
> > > >   has_and_belongs_to_many :orders
> > > > end
>
> > > > class Order < ActiveRecord::Base
> > > >   has_and_belongs_to_many :contacts
> > > > end
>
> > > > (I do have a join table called contacts_orders in my database, but no
> > > > model in my rails application.)
>
> > > > _update_form_.rhtml (override inside the order view)
> > > > <%= render :active_scaffold => 'contacts', :constraints => {:order_id
> > > > => @record.id} %>
>
> > > > This does not work because order_id does not exist inside Contact
> > > > model
>
> > > > What am I missing to constrain this embedded scaffold so that it only
> > > > deals with the contacts that are related to this order?
>
> > > Try with {:orders => @record}, or {'contacts_orders.order_id' =>
> > > @record.id}
>
> > > --
> > > Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
> > > Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
> > > T) 902 021 404 F) 976 52 98 07 E) [EMAIL PROTECTED]
>
> --
> Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
> Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
> T) 902 021 404 F) 976 52 98 07 E) [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

  • co... cntrytwist
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... cntrytwist
        • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
          • ... cntrytwist

Reply via email to