app/controllers/pictures_controller.rb
# View the index of picture, there are All pictures with pagination
View the index of picture, there are All pictures with pagination
View the index of picture there are All pictures with pagination
def index
    if params[:gallery_id]
      redirect_to gallery_url(Gallery.find_by_permalink(params[:gallery_id]))
    else
      @pictures = Picture.paginate :page => params[:page],
        :per_page => this_webapp.pictures_pagination
    end
    respond_to do |format|
      format.html
    end
  end
def index if params [ :gallery_id ] redirect_to gallery_url ( Gallery . find_by_permalink ( params [ :gallery_id ] ) ) else @pictures = Picture . paginate :page => params [ :page ] , :per_page => this_webapp . pictures_pagination end respond_to do | format | format . html end end
View the index of picture, there are All pictures with pagination
View the index of picture there are All pictures with pagination