Hi Pat, using ROR 2.3.8

I have this in City.rb:

@trip_days = TripDay.published.search params[:keyword], {
          :conditions     => conditions,
          :star           => true,
          :group_by       => 'trip_id',
          :group_function => :attr,
          :page           => params[:page]
        }.merge(:order => 'rating_average DESC')
      @trips = @trip_days.collect { |trip_day| trip_day.trip }

How can I tell Rails to get the rating_average from Trip model column,
instead of TripDay model? Because the TripDay model does not have
rating_average. It's actually Trip model that gets rated.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" 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/thinking-sphinx?hl=en.

Reply via email to