Closed pch closed 12 years ago
I've run into an issue with the last version of meta_search. Controller:
@search = Website.search(params[:search]) # Search params are empty
This results in:
SELECT `websites`.* FROM `websites`
When I add some chaining to the controller code:
@search = Website.search(params[:search]) @websites = @search.paginate(:page => params[:page], :per_page => params[:per_page] || 10)
2 queries are executed:
SELECT `websites`.* FROM `websites` LIMIT 10 OFFSET 0 SELECT `websites`.* FROM `websites`
Shouldn't it use lazy loading and execute just 1 query?
Forget it, my bad. For some reason rails_footnotes is causing this.
I've run into an issue with the last version of meta_search. Controller:
This results in:
When I add some chaining to the controller code:
2 queries are executed:
Shouldn't it use lazy loading and execute just 1 query?