but I'm filtering on the records for one of the associations, and
using the helper method "options_for_association_conditions"?  So it
seems that the output of this method is for the ":conditions"..... So
my "app/helpers/transaction_helper.rb" file looks like the below.
Again my aim again is to get sorting on the drop down list for this
"category" association...

==========================
module TransactionHelper
  def category_column(record)
    Category.find(:all, :conditions => 'active = true')
  end

  def options_for_association_conditions(association)
    if association.name == :category
      ['active = 1 OR active is null']
    else
      super
    end
  end

end
==========================



On Sep 2, 2:14 pm, Sri Sri <[EMAIL PROTECTED]> wrote:
> Try :order.
> ....find(:all, :conditions => "", :order => "")
>
> greghauptmann wrote:
> > 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
--~--~---------~--~----~------------~-------~--~----~
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