views:

48

answers:

1

hi,

in will_paginate, i am using custom pagination.

Here, i am adding image for pagelinks as well as previous_buttons and next_button.

I get same image for both pagelinks and (prev, next buttons)

I want to differ the pagelink images with (prev,next buttons) i.e two different images in all.

i applied code from below link to my application

please guide me how i can go about it.

A: 

Put this into your environment.rb

WillPaginate::ViewHelpers.pagination_options[:previous_label] = '<img scr="prev_label.jpg" alt="Prev page" />'
WillPaginate::ViewHelpers.pagination_options[:next_label] = '<img scr="next_label.jpg" alt="Next page" />'
fantactuka
where to put in environment?inside initializer loop or outside the loop.when i put inside loop i get error while running server.error: load_missing_constant: uninitialized constant will_paginatewhen i put outside loop, there is no effect
nirmal
I guess you also have to add require 'will_paginate' at the top and put this code inside initializer block. (I was trying it with rails 3.0.0.betta4 - put it just at the end of the file)
fantactuka