The equivalent method to that must be association_options_find, which returns a 
array of 
records. But there is another method which may be better to override, 
association_klass_scoped, it can replace options_for_association because it 
allows you to 
use scopes, where, or whatever which returns a relation

def association_klass_scoped(association, klass, record)

klass is usually same as association.klass, but for polymorphic associations, 
it will be the 
selected class.

El Tuesday 01 December 2015 07:33:46 loveand light escribió:


Hi,

I am trying to use form_ui :select  with a through association. In the console 
I can get 
back the filtered set but when I use AS it returns the entire set of the 
orginal has_many 
relationship. The query is quite complicated and involves a bunch of inner 
joins so I dont 
think I can use options_for_association_conditions. 

I was thinking that options_for_association  would be my remedy but it looks 
like it has 
been deprecated from the current code.

Does anyone know how to limit the scope of the options to not include the 
entire set?

thanks in advance.Mark


-- You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.To unsubscribe from this group and 
stop 
receiving emails from it, send an email to activescaffold
[email protected][1].To post to this group, send email to 
[email protected][2].Visit this group at http://groups.google.com/
group/activescaffold[3].For more options, visit 
https://groups.google.com/d/optout[4].





--------
[1] mailto:[email protected]
[2] mailto:[email protected]
[3] http://groups.google.com/group/activescaffold
[4] https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to