Displaying 1 result from an estimated 1 matches for "prev_pictur".
Did you mean:
prev_picture
2011 Apr 07
0
Refactor sorting of images
...d''
number.
A user can click like from an image once.
The index of the images can be sorted after ''liked'', and ''published''.
The show from an image has a next and prev button, so that you can
browse through the all images.
A picture has a next_picture and prev_picture method, so that it can
fetch it''s successor and predecessor.
## pictures_controller
def index
..
@pictures = Picture.where(:state => ''published'').paginate :page =>
params[:page], :per_page => per_page, :order => "#{sort_order.to_s}
DESC"
..
end...