def index
      @special_pages = []
      @pages = Page.search(params[:search])
      if params[:search]
        # if we're searching, and there's only one link, redirect to the first result
        if @pages.count == 1
          redirect_to wiki_path(@pages.first)
        end
      else
        # if we're not searching, display all the Special pages too
        @special_pages = special_pages.reject { |page| @pages.map(&:title).include?(page.title) }
      end
    end
def index
      @special_pages = []
      @pages = Page.search(params[:search])
      if params[:search]
        # if we're searching, and there's only one link, redirect to the first result
        if @pages.count == 1
          redirect_to wiki_path(@pages.first)
        end
      else
        # if we're not searching, display all the Special pages too
        @special_pages = special_pages.reject { |page| @pages.map(&:title).include?(page.title) }
      end
    end
GET /pages