app/controllers/admin/galleries_controller.rb
# See a gallery in Admin like a User
See a gallery in Admin like a User
See a gallery in Admin like a User
def show
    @gallery = Gallery.find_by_permalink params[:id]
    unless @gallery.nil?
      @pictures = Picture.paginate_by_gallery_id @gallery.id, :page => params[:page],
        :per_page => 12
    else
      render :status => 404
    end
  end
def show @gallery = Gallery . find_by_permalink params [ :id ] unless @gallery . nil? @pictures = Picture . paginate_by_gallery_id @gallery . id , :page => params [ :page ] , :per_page => 12 else render :status => 404 end end
See a gallery in Admin like a User
See a gallery in Admin like a User