I intend to override pagination_links method. I added following lines of code in application_helper.rb module ActionView module Helpers def pagination_links(paginator, options={}, html_options={}) raise("boom!!") end end end But my code is not executing my code. The view is still using the method pagination_links from rails. What''s the correct way to override this method? -=- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060427/885f47b3/attachment.html
On 4/26/06, Neeraj Kumar <neeraj.jsr@gmail.com> wrote:> I intend to override pagination_links method. > > I added following lines of code in application_helper.rb > > module ActionView > module Helpers > > def pagination_links(paginator, options={}, html_options={}) > raise("boom!!") > end > > end > end > > But my code is not executing my code. The view is still using the method > pagination_links from rails. > > What''s the correct way to override this method? > > -=- >Needs to be: module ActionView module Helpers module PaginationHelper def pagination_links(paginator, options={}, html_options={}) # your code end end end end
Thanks Wilson. That was quick. Appreciate it. -=- On 4/26/06, Wilson Bilkovich <wilsonb@gmail.com> wrote:> > On 4/26/06, Neeraj Kumar <neeraj.jsr@gmail.com> wrote: > > I intend to override pagination_links method. > > > > I added following lines of code in application_helper.rb > > > > module ActionView > > module Helpers > > > > def pagination_links(paginator, options={}, html_options={}) > > raise("boom!!") > > end > > > > end > > end > > > > But my code is not executing my code. The view is still using the method > > pagination_links from rails. > > > > What''s the correct way to override this method? > > > > -=- > > > > Needs to be: > module ActionView > module Helpers > module PaginationHelper > def pagination_links(paginator, options={}, html_options={}) > # your code > end > end > end > end > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060427/28b154a8/attachment.html