Wes,

Yes, I'm trying to display the elb_id on the Instances page. I got it
to display as a virtual column, so I guess I'm set there.

The "Create New" icon is showing up in both the Instances scaffold
(under the elb column) and the ELBs scaffold (under the instance
column.)

As for searching and sorting these columns, I'm still having
trouble.

For sorting, I think I need to either write a helper method or use
conf.columns[:elb_column].sort_by :sql => "" in the controller.

For searching, I must have to use a search helper method because I
don't see where to get this done unless I use this in the controller:
conf.columns[:elb_column].search_sql = "".

Jay

On Jun 20, 3:18 pm, Wes Gamble <[email protected]> wrote:
> BTW, I could be wrong about the sorting thing.  It's been a while for
> that stuff for me.
>
> What do you want to appear - the elb_id?  You will have to provide  a
> virtual column for that.
>
> Which scaffold is trying to display which side of the association and
> showing "Create New" links?
>
> Wes
>
> On 6/20/11 2:13 PM, Jay wrote:
>
>
>
>
>
>
>
> > @Wes:
>
> > Thanks for the info. I'll follow that route if necessary. But the
> > primary problem is getting the association column values to appear,
> > rather than "Create New" action links. Are there other items I need to
> > specify in the models? I'm not sure what's missing.
>
> > On Jun 20, 3:06 pm, Wes Gamble<[email protected]>  wrote:
> >> On 6/20/11 1:56 PM, Jay wrote:>  Just following up with this post:
>
> >>> I now see that virtual columns are neither sortable or searchable by
> >>> default. For this reason, I would prefer to fix the association
> >>> columns, rather than making them virtual. However, if I kept them
> >>> virtual, it seems from some other posts that I could just add
> >>>             conf.columns[:elb_column].search_sql = 'elbs.elb_id'
> >>> in the instances controller.
> >> I seem to recall that you could specify a method for sorting and/or
> >> searching on virtual columns.>  For removing duplicates from the select 
> >> menu, should I just create a
> >>> helper search method, or should that resolve itself once I fix the
> >>> association problem?
> >> I think you'll have to remove dups on your own.
>
> >> Wes

-- 
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