#model location.rb named_scope :grouped, :select => 'locations.id', :group => 'locations.id' has_many :criterias, :through => :locations_criterias
#controller locations_controller.rb # i havent even gotten to the paginate part yet @locations = Location.criterias_name_or_name_like(@query).grouped #.paginate(:page => params[:page]) the @locations returns multiples of same result so i added the grouped named scope that only selects the id in order to only group on id at this point i need to rebuild my location object using the id returned by @locations -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

