Awesome. I'll give this a shot over the weekend and let you know how it goes.
On Oct 20, 5:24 am, "Sergio Cambra .:: entreCables S.L. ::." <[email protected]> wrote: > On Miércoles, 14 de Octubre de 2009 20:28:18 Ryan escribió: > > > > > Hey guys, > > > I have a rather hefty table that I want to do a full text search on. > > I have a ThinkingSphinx database setup for our user-land searches, and > > I was struggling w/ augmenting the finder logic in ActiveScaffold so > > that our admins could benefit from that as well. It just dawned on me > > I could just do this:http://gist.github.com/210295 > > > The problem I'm now running into is the fact that default/views/ > > _list_pagination_links.html.erb hardcodes the action name when > > generating its links: > > > <% pagination_params = params_for(:action => 'update_table') -%> > > > I'd like to make this action not hardcoded, but I'm struggling finding > > the right place to put this option in the AS code. Can someone point > > me in the right direction to how I can make this patch? (Or if I've > > missed some other solution to creating custom pagination links?) > > IMO is better to add another search action, like sphinx_search, and use > actions.swap :search, :sphinx_search. That module should set a before_filter > like search or field_search modules, but do_search method would do the actual > search like your code, instead of setting conditions like search or > field_search modules. Also should add a do_list method like this: > def do_list > super if @records.nil? > end > > I haven't used ThinkingSphinx so I can't try to implement that, but I can help > you if it doesn't work or you have some questions. > > PS: I didn't answer before because I was on holidays > > -- > Sergio Cambra .:: entreCables S.L. ::. > Mariana Pineda 23, 50.018 Zaragoza > T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
