Radhames Brito wrote in post #1065828:
>>
> if @search is not an ActiveRecord::Relation object you cant chain it
> with
>  another ActiveRecord::Relation object. What class does the search
> function
> returns? are you using a gem? the search function could be returning an
> array in which case you have to build your own sorting mechanism.

Hi rbritom.

I am using the sunspot_rails gem (https://github.com/sunspot/sunspot).

My old search function (and sorting function) was build after Railscast
240 (http://railscasts.com/episodes/240-search-sort-paginate-with-ajax),
but as I needed to search through multiple columns I implemented Sunspot
instead. Not quite sure if @search is an ActiveRecord::Relation. Fairly
new to Rails.

-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to