In my case lecturer association is not included by default. Can you
tell me, is it new feature or I'm missing something?
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.
>
>

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