lingz/alphabetical_paginate

How to preserve all letters?

Opened this issue · 0 comments

I have come up with this ugly solution

@q = Country.only_countries.search(params[:q])
 @countries, @alphaParams = Country.only_countries.alpha_paginate(params[:letter], {support_language: :ru, js: false}){ |c| c.name }
 @countries, _ = @q.result.alpha_paginate(params[:letter], {support_language: :ru, js: false}){ |c| c.name }

Is there any way to do it properly?