thanks for this thread re how to filter down the number of records in
a SELECT.    Is there a way however to be able to modify the SORT
ORDER of the pull down list?   I tried putting a "order by" in the
options_for_association_conditions however the SQL generated doesn't
work, as it is creating a "where( xxx )" in brackets.

Any ideas how to get sorting on a field drop down list for an
association working?  (i.e. without having to do a full field
override)

tks



On Aug 12, 11:48 pm, otto <[EMAIL PROTECTED]> wrote:
> Thank you. Already reading. I also found 
> thishttp://wiki.activescaffold.com/wiki/published/Dynamic+conditions_for_....
> Documentation is all scattered around the Internet, googlecode forum,
> git repository, home site, wiki at home site, wiki at googlecode,
> 4thebusiness.com demo, comments in README/code. Anyway, AS and friends
> are so well done that looking at all this places for the right bit of
> info is like finding a hidden treasure. One never find garbage.
>
> On 11 ago, 11:06, Ed W <[EMAIL PROTECTED]> wrote:
>
> > ottowrote:
> > > I have a pretty typical scenario:
> > > client has_many :invoices
> > > invoice belongs_to :client
>
> > > When I create an invoice, I configured config[:client].form_ui
> > > = :select so clients are shown as a list because I did not want there
> > > the full power of a nested scaffold. Clients have a column named
> > > active (boolean) to flag them as such. I want the client list in the
> > > invoice active_scaffold to show only the active = true records while
> > > the client controller active_scaffold shows all of them. Somehow I see
> > > both of these (the client :select ui and the client controller
> > > active_scaffold) are related but I am unable to see how and where to
> > > filter these only when displaying as a :select ui on the invoice.
> > > I am new to Rails and AS. Please treat me as your apprentice. I am
> > > humble. You are patient master(s). :)
>
> > Check the docshttp://activescaffold.com/tutorials/custom-association-options
>
> > Does that help?
>
> > Ed W
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • Re... greghauptmann
    • ... Sri Sri
    • ... Sri Sri
      • ... greghauptmann
        • ... Sri Sri
        • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
    • ... omer

Reply via email to