On Jueves, 16 de Septiembre de 2010 10:22:37 Andrey Voronkov escribió: > In my case lecturer association is not included by default. Can you > tell me, is it new feature or I'm missing something?
It should be included by default if lecturer is a column with an association, it's included in list columns and you don't set includes. If you set includes like config.columns[:lecturer].includes = [:department] lecturer won't be included. It's a very old feature. > > 2010/9/16 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>: > > On Jueves, 16 de Septiembre de 2010 01:16:31 Andrey Voronkov escribió: > >> Could not find column lecturers.name > >> I think it's because in teaching_places i have only lecturer_id in my > >> sql query > >> > >> config.columns[:lecturer].includes = [:lecturer, :department] > >> config.columns[:lecturer].sort_by :sql => 'lecturers.name' > >> > >> this did the trick > > > > Yes, you have to include lecturer if you want order by a lecturer field. > > It's included by default, but if you change includes you must set > > lecturer too. > > > >> 2010/9/15 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>: > >> > {'lecturers.name' => ASC} > > > > -- > > 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. -- 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.
