On Martes, 19 de Abril de 2011 16:31:58 Liehann escribió:
> Oh, the one other change I had to make was modify the parameter list
> for the helper override. I needed access to the column parameter so I
> added that. Not ideal as it meant a change to active scaffold, but I
> couldn't see another way to get the column.

You know the column name, so you can get it with 
active_scaffold_config.columns[:column_name]

> 
>  - L
> 
> On Apr 19, 8:17 am, Liehann <[email protected]> wrote:
> > Thanks for the response.
> > 
> > Draggable lists only works with prototype, I'm using jQuery. I'm
> > checking out active_scaffold_sortable which looks like it should do
> > the same thing for jQuery.
> > 
> > The second issue is the default form_ui options displays all items,
> > whereas I only want to display those that are associated with the
> > specific order, or not yet associated with an order.
> > 
> > My current approach is to do a form override method in the
> > OrdersHelper. It looks like is should do the trick. I'll update the
> > post once I've determined if it works (or not).
> > 
> >  - L
> > 
> > On Apr 19, 1:51 am, Michael Latta <[email protected]> wrote:
> > > From the documentation on the column API when using form_ui = :select
> > > 
> > >         • For plural associations:
> > >                 • :draggable_lists to show two lists, one with
> > > available options and the other with selected options; users select
> > > them with drag and drop instead of checkboxes.
> > > config.columns[:name].options = {:draggable_lists => true}
> > > 
> > > Michael
> > > 
> > > On Apr 18, 2011, at 10:03 AM, Liehann wrote:
> > > > Hi,
> > > > 
> > > > I'd like to customize an association, but on the has_many side.
> > > > 
> > > > For example we have orders and items. An order has many items, an
> > > > item may belong to an order.
> > > > 
> > > > class Order
> > > >  has_many :items
> > > > end
> > > > 
> > > > class Item
> > > >  belongs_to :order
> > > > end
> > > > 
> > > > When adding / editing an order I'd like to display two lists - the
> > > > left one shows the items associated with the order, the right the
> > > > items not associated with any order.
> > > > 
> > > > if I do "config.columns[:items].form_ui = :select" I get a check box
> > > > for each item - not quite what I want. Any suggestions on how to
> > > > customize the behavior?
> > > > 
> > > > - Liehann
> > > > 
> > > > --
> > > > 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 athttp://groups.google.com/group/activescaffold?hl=en.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.

Reply via email to